MCPcopy Create free account
hub / github.com/Overload-Technologies/Overload / GetIntRef

Method GetIntRef

Dependencies/ImGui/src/imgui.cpp:2801–2807  ·  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

2799
2800// 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.
2801int* ImGuiStorage::GetIntRef(ImGuiID key, int default_val)
2802{
2803 ImGuiStoragePair* it = ImLowerBound(Data.Data, Data.Data + Data.Size, key);
2804 if (it == Data.Data + Data.Size || it->key != key)
2805 it = Data.insert(it, ImGuiStoragePair(key, default_val));
2806 return &it->val_i;
2807}
2808
2809bool* ImGuiStorage::GetBoolRef(ImGuiID key, bool default_val)
2810{

Callers 2

SetItemSelectedMethod · 0.80
GetOrAddByKeyMethod · 0.80

Calls 3

ImLowerBoundFunction · 0.85
ImGuiStoragePairClass · 0.85
insertMethod · 0.45

Tested by

no test coverage detected