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)
| 2022 | |
| 2023 | // 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) |
| 2024 | void ImGuiStorage::SetInt(ImGuiID key, int val) |
| 2025 | { |
| 2026 | ImGuiStoragePair* it = LowerBound(Data, key); |
| 2027 | if (it == Data.end() || it->key != key) |
| 2028 | { |
| 2029 | Data.insert(it, ImGuiStoragePair(key, val)); |
| 2030 | return; |
| 2031 | } |
| 2032 | it->val_i = val; |
| 2033 | } |
| 2034 | |
| 2035 | void ImGuiStorage::SetBool(ImGuiID key, bool val) |
| 2036 | { |
no test coverage detected