MCPcopy Create free account
hub / github.com/KebsCS/KBotExt / SetInt

Method SetInt

KBotExt/imgui/imgui.cpp:2450–2459  ·  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

2448
2449// 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)
2450void ImGuiStorage::SetInt(ImGuiID key, int val)
2451{
2452 ImGuiStoragePair* it = LowerBound(Data, key);
2453 if (it == Data.end() || it->key != key)
2454 {
2455 Data.insert(it, ImGuiStoragePair(key, val));
2456 return;
2457 }
2458 it->val_i = val;
2459}
2460
2461void ImGuiStorage::SetBool(ImGuiID key, bool val)
2462{

Callers 3

TreeNodeSetOpenMethod · 0.80
TreeNodeBehaviorMethod · 0.80
RemoveMethod · 0.80

Calls 3

LowerBoundFunction · 0.85
ImGuiStoragePairClass · 0.85
endMethod · 0.45

Tested by

no test coverage detected