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

Method SetInt

src/imgui/imgui.cpp:2872–2879  ·  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

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)
2873{
2874 ImGuiStoragePair* it = ImLowerBound(Data.Data, Data.Data + Data.Size, key);
2875 if (it == Data.Data + Data.Size || it->key != key)
2876 Data.insert(it, ImGuiStoragePair(key, val));
2877 else
2878 it->val_i = val;
2879}
2880
2881void ImGuiStorage::SetBool(ImGuiID key, bool val)
2882{

Callers 4

AddRemapCharMethod · 0.80
TreeNodeSetOpenMethod · 0.80
TreeNodeBehaviorMethod · 0.80
RemoveMethod · 0.80

Calls 3

ImGuiStoragePairClass · 0.85
ImLowerBoundFunction · 0.70
insertMethod · 0.45

Tested by

no test coverage detected