MCPcopy Create free account
hub / github.com/DISTRHO/Cardinal / GetIntRef

Method GetIntRef

plugins/Cardinal/src/DearImGui/imgui.cpp:1994–2000  ·  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

1992
1993// 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.
1994int* ImGuiStorage::GetIntRef(ImGuiID key, int default_val)
1995{
1996 ImGuiStoragePair* it = LowerBound(Data, key);
1997 if (it == Data.end() || it->key != key)
1998 it = Data.insert(it, ImGuiStoragePair(key, default_val));
1999 return &it->val_i;
2000}
2001
2002bool* ImGuiStorage::GetBoolRef(ImGuiID key, bool default_val)
2003{

Callers 1

GetOrAddByKeyFunction · 0.80

Calls 4

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

Tested by

no test coverage detected