MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / GetIntRef

Method GetIntRef

lib/imgui/imgui.cpp:1881–1887  ·  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

1879
1880// 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.
1881int* ImGuiStorage::GetIntRef(ImGuiID key, int default_val)
1882{
1883 ImGuiStoragePair* it = LowerBound(Data, key);
1884 if (it == Data.end() || it->key != key)
1885 it = Data.insert(it, ImGuiStoragePair(key, default_val));
1886 return &it->val_i;
1887}
1888
1889bool* ImGuiStorage::GetBoolRef(ImGuiID key, bool default_val)
1890{

Callers 1

GetOrAddByKeyFunction · 0.80

Calls 4

LowerBoundFunction · 0.85
ImGuiStoragePairClass · 0.85
endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected