MCPcopy Create free account
hub / github.com/cinder/Cinder / GetVoidPtrRef

Method GetVoidPtrRef

src/imgui/imgui.cpp:2863–2869  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2861}
2862
2863void** ImGuiStorage::GetVoidPtrRef(ImGuiID key, void* default_val)
2864{
2865 ImGuiStoragePair* it = ImLowerBound(Data.Data, Data.Data + Data.Size, key);
2866 if (it == Data.Data + Data.Size || it->key != key)
2867 it = Data.insert(it, ImGuiStoragePair(key, default_val));
2868 return &it->val_p;
2869}
2870
2871// 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)
2872void ImGuiStorage::SetInt(ImGuiID key, int val)

Callers 1

ImFontAtlasBakedGetOrAddFunction · 0.80

Calls 3

ImGuiStoragePairClass · 0.85
ImLowerBoundFunction · 0.70
insertMethod · 0.45

Tested by

no test coverage detected