MCPcopy Create free account
hub / github.com/SatDump/SatDump / SetInt

Method SetInt

src-core/imgui/imgui.cpp:2477–2486  ·  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

2475
2476// 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)
2477void ImGuiStorage::SetInt(ImGuiID key, int val)
2478{
2479 ImGuiStoragePair* it = LowerBound(Data, key);
2480 if (it == Data.end() || it->key != key)
2481 {
2482 Data.insert(it, ImGuiStoragePair(key, val));
2483 return;
2484 }
2485 it->val_i = val;
2486}
2487
2488void ImGuiStorage::SetBool(ImGuiID key, bool val)
2489{

Callers 4

TreeNodeSetOpenMethod · 0.80
TreeNodeBehaviorMethod · 0.80
RemoveMethod · 0.80
AppendMethod · 0.80

Calls 4

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

Tested by

no test coverage detected