MCPcopy Create free account
hub / github.com/KebsCS/KBotExt / GetIntRef

Method GetIntRef

KBotExt/imgui/imgui.cpp:2420–2426  ·  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

2418
2419// 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.
2420int* ImGuiStorage::GetIntRef(ImGuiID key, int default_val)
2421{
2422 ImGuiStoragePair* it = LowerBound(Data, key);
2423 if (it == Data.end() || it->key != key)
2424 it = Data.insert(it, ImGuiStoragePair(key, default_val));
2425 return &it->val_i;
2426}
2427
2428bool* ImGuiStorage::GetBoolRef(ImGuiID key, bool default_val)
2429{

Callers 1

GetOrAddByKeyMethod · 0.80

Calls 3

LowerBoundFunction · 0.85
ImGuiStoragePairClass · 0.85
endMethod · 0.45

Tested by

no test coverage detected