MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / SetInt

Method SetInt

lib/imgui/imgui.cpp:1911–1920  ·  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

1909
1910// 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)
1911void ImGuiStorage::SetInt(ImGuiID key, int val)
1912{
1913 ImGuiStoragePair* it = LowerBound(Data, key);
1914 if (it == Data.end() || it->key != key)
1915 {
1916 Data.insert(it, ImGuiStoragePair(key, val));
1917 return;
1918 }
1919 it->val_i = val;
1920}
1921
1922void ImGuiStorage::SetBool(ImGuiID key, bool val)
1923{

Callers 3

TreeNodeBehaviorMethod · 0.80
RemoveFunction · 0.80

Calls 4

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

Tested by

no test coverage detected