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)
| 2829 | |
| 2830 | // 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) |
| 2831 | void ImGuiStorage::SetInt(ImGuiID key, int val) |
| 2832 | { |
| 2833 | ImGuiStoragePair* it = ImLowerBound(Data.Data, Data.Data + Data.Size, key); |
| 2834 | if (it == Data.Data + Data.Size || it->key != key) |
| 2835 | Data.insert(it, ImGuiStoragePair(key, val)); |
| 2836 | else |
| 2837 | it->val_i = val; |
| 2838 | } |
| 2839 | |
| 2840 | void ImGuiStorage::SetBool(ImGuiID key, bool val) |
| 2841 | { |
no test coverage detected