MCPcopy Create free account
hub / github.com/AlexandreRouma/SDRPlusPlus / GetIntRef

Method GetIntRef

core/src/imgui/imgui.cpp:1945–1951  ·  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

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

Callers 1

GetOrAddByKeyFunction · 0.80

Calls 3

LowerBoundFunction · 0.85
ImGuiStoragePairClass · 0.85
endMethod · 0.45

Tested by

no test coverage detected