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)
| 2386 | |
| 2387 | // 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) |
| 2388 | void ImGuiStorage::SetInt(ImGuiID key, int val) |
| 2389 | { |
| 2390 | ImGuiStoragePair* it = LowerBound(Data, key); |
| 2391 | if (it == Data.end() || it->key != key) |
| 2392 | { |
| 2393 | Data.insert(it, ImGuiStoragePair(key, val)); |
| 2394 | return; |
| 2395 | } |
| 2396 | it->val_i = val; |
| 2397 | } |
| 2398 | |
| 2399 | void ImGuiStorage::SetBool(ImGuiID key, bool val) |
| 2400 | { |
no test coverage detected