MCPcopy Create free account
hub / github.com/cinder/Cinder / GetIntRef

Method GetIntRef

src/imgui/imgui.cpp:2842–2848  ·  view source on GitHub ↗

References are only valid until a new value is added to the storage. Calling a Set***() function or a Get***Ref() function invalidates the pointer.

Source from the content-addressed store, hash-verified

2840
2841// References are only valid until a new value is added to the storage. Calling a Set***() function or a Get***Ref() function invalidates the pointer.
2842int* ImGuiStorage::GetIntRef(ImGuiID key, int default_val)
2843{
2844 ImGuiStoragePair* it = ImLowerBound(Data.Data, Data.Data + Data.Size, key);
2845 if (it == Data.Data + Data.Size || it->key != key)
2846 it = Data.insert(it, ImGuiStoragePair(key, default_val));
2847 return &it->val_i;
2848}
2849
2850bool* ImGuiStorage::GetBoolRef(ImGuiID key, bool default_val)
2851{

Callers 3

ItemAddMethod · 0.80
SetItemSelectedMethod · 0.80
GetOrAddByKeyMethod · 0.80

Calls 3

ImGuiStoragePairClass · 0.85
ImLowerBoundFunction · 0.70
insertMethod · 0.45

Tested by

no test coverage detected