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)
| 2633 | |
| 2634 | // 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) |
| 2635 | void ImGuiStorage::SetInt(ImGuiID key, int val) |
| 2636 | { |
| 2637 | ImGuiStoragePair* it = ImLowerBound(Data.Data, Data.Data + Data.Size, key); |
| 2638 | if (it == Data.end() || it->key != key) |
| 2639 | Data.insert(it, ImGuiStoragePair(key, val)); |
| 2640 | else |
| 2641 | it->val_i = val; |
| 2642 | } |
| 2643 | |
| 2644 | void ImGuiStorage::SetBool(ImGuiID key, bool val) |
| 2645 | { |
no test coverage detected