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)
| 2870 | |
| 2871 | // 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) |
| 2872 | void ImGuiStorage::SetInt(ImGuiID key, int val) |
| 2873 | { |
| 2874 | ImGuiStoragePair* it = ImLowerBound(Data.Data, Data.Data + Data.Size, key); |
| 2875 | if (it == Data.Data + Data.Size || it->key != key) |
| 2876 | Data.insert(it, ImGuiStoragePair(key, val)); |
| 2877 | else |
| 2878 | it->val_i = val; |
| 2879 | } |
| 2880 | |
| 2881 | void ImGuiStorage::SetBool(ImGuiID key, bool val) |
| 2882 | { |
no test coverage detected