MCPcopy Create free account
hub / github.com/Overload-Technologies/Overload / SetInt

Method SetInt

Dependencies/ImGui/src/imgui.cpp:2831–2838  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

2829
2830// 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)
2831void ImGuiStorage::SetInt(ImGuiID key, int val)
2832{
2833 ImGuiStoragePair* it = ImLowerBound(Data.Data, Data.Data + Data.Size, key);
2834 if (it == Data.Data + Data.Size || it->key != key)
2835 Data.insert(it, ImGuiStoragePair(key, val));
2836 else
2837 it->val_i = val;
2838}
2839
2840void ImGuiStorage::SetBool(ImGuiID key, bool val)
2841{

Callers 3

TreeNodeSetOpenMethod · 0.80
TreeNodeBehaviorMethod · 0.80
RemoveMethod · 0.80

Calls 3

ImLowerBoundFunction · 0.85
ImGuiStoragePairClass · 0.85
insertMethod · 0.45

Tested by

no test coverage detected