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

Method GetVoidPtrRef

lib/imgui/imgui.cpp:1902–1908  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1900}
1901
1902void** ImGuiStorage::GetVoidPtrRef(ImGuiID key, void* default_val)
1903{
1904 ImGuiStoragePair* it = LowerBound(Data, key);
1905 if (it == Data.end() || it->key != key)
1906 it = Data.insert(it, ImGuiStoragePair(key, default_val));
1907 return &it->val_p;
1908}
1909
1910// FIXME-OPT: Need a way to reuse the result of lower_bound when doing GetInt()/SetInt() - not too bad because it only happens on explicit interaction (maximum one a frame)
1911void ImGuiStorage::SetInt(ImGuiID key, int val)

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected