MCPcopy Create free account
hub / github.com/RenderKit/embree / GetIntRef

Method GetIntRef

tutorials/common/imgui/imgui.cpp:2296–2302  ·  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

2294
2295// 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.
2296int* ImGuiStorage::GetIntRef(ImGuiID key, int default_val)
2297{
2298 ImGuiStoragePair* it = LowerBound(Data, key);
2299 if (it == Data.end() || it->key != key)
2300 it = Data.insert(it, ImGuiStoragePair(key, default_val));
2301 return &it->val_i;
2302}
2303
2304bool* ImGuiStorage::GetBoolRef(ImGuiID key, bool default_val)
2305{

Callers 1

GetOrAddByKeyMethod · 0.80

Calls 3

LowerBoundFunction · 0.85
ImGuiStoragePairClass · 0.85
endMethod · 0.45

Tested by

no test coverage detected