MCPcopy Create free account
hub / github.com/VictorGordan/opengl-tutorials / SetInt

Method SetInt

ImGUI GLFW Tutorial/imgui/imgui.cpp:1972–1981  ·  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

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

Callers 3

TreeNodeBehaviorMethod · 0.45
RemoveFunction · 0.45

Calls 4

LowerBoundFunction · 0.70
ImGuiStoragePairClass · 0.70
endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected