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)
| 2448 | |
| 2449 | // 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) |
| 2450 | void ImGuiStorage::SetInt(ImGuiID key, int val) |
| 2451 | { |
| 2452 | ImGuiStoragePair* it = LowerBound(Data, key); |
| 2453 | if (it == Data.end() || it->key != key) |
| 2454 | { |
| 2455 | Data.insert(it, ImGuiStoragePair(key, val)); |
| 2456 | return; |
| 2457 | } |
| 2458 | it->val_i = val; |
| 2459 | } |
| 2460 | |
| 2461 | void ImGuiStorage::SetBool(ImGuiID key, bool val) |
| 2462 | { |
no test coverage detected