MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/PositionBasedDynamics / SetInt

Method SetInt

extern/imgui/imgui.cpp:2388–2397  ·  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

2386
2387// 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)
2388void ImGuiStorage::SetInt(ImGuiID key, int val)
2389{
2390 ImGuiStoragePair* it = LowerBound(Data, key);
2391 if (it == Data.end() || it->key != key)
2392 {
2393 Data.insert(it, ImGuiStoragePair(key, val));
2394 return;
2395 }
2396 it->val_i = val;
2397}
2398
2399void ImGuiStorage::SetBool(ImGuiID key, bool val)
2400{

Callers 3

TreeNodeSetOpenMethod · 0.80
TreeNodeBehaviorMethod · 0.80
RemoveMethod · 0.80

Calls 4

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

Tested by

no test coverage detected