MCPcopy Create free account
hub / github.com/VictorGordan/opengl-tutorials / GetIntRef

Method GetIntRef

ImGUI GLFW Tutorial/imgui/imgui.cpp:1942–1948  ·  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

1940
1941// 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.
1942int* ImGuiStorage::GetIntRef(ImGuiID key, int default_val)
1943{
1944 ImGuiStoragePair* it = LowerBound(Data, key);
1945 if (it == Data.end() || it->key != key)
1946 it = Data.insert(it, ImGuiStoragePair(key, default_val));
1947 return &it->val_i;
1948}
1949
1950bool* ImGuiStorage::GetBoolRef(ImGuiID key, bool default_val)
1951{

Callers 1

GetOrAddByKeyFunction · 0.45

Calls 4

LowerBoundFunction · 0.70
ImGuiStoragePairClass · 0.70
endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected