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)
| 2324 | |
| 2325 | // 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) |
| 2326 | void ImGuiStorage::SetInt(ImGuiID key, int val) |
| 2327 | { |
| 2328 | ImGuiStoragePair* it = LowerBound(Data, key); |
| 2329 | if (it == Data.end() || it->key != key) |
| 2330 | { |
| 2331 | Data.insert(it, ImGuiStoragePair(key, val)); |
| 2332 | return; |
| 2333 | } |
| 2334 | it->val_i = val; |
| 2335 | } |
| 2336 | |
| 2337 | void ImGuiStorage::SetBool(ImGuiID key, bool val) |
| 2338 | { |
no test coverage detected