MCPcopy Create free account
hub / github.com/AlexandreRouma/SDRPlusPlus / SetInt

Method SetInt

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

1973
1974// 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)
1975void ImGuiStorage::SetInt(ImGuiID key, int val)
1976{
1977 ImGuiStoragePair* it = LowerBound(Data, key);
1978 if (it == Data.end() || it->key != key)
1979 {
1980 Data.insert(it, ImGuiStoragePair(key, val));
1981 return;
1982 }
1983 it->val_i = val;
1984}
1985
1986void ImGuiStorage::SetBool(ImGuiID key, bool val)
1987{

Callers 5

TreeNodeBehaviorMethod · 0.80
RemoveFunction · 0.80

Calls 3

LowerBoundFunction · 0.85
ImGuiStoragePairClass · 0.85
endMethod · 0.45

Tested by

no test coverage detected