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)
| 3000 | |
| 3001 | // 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) |
| 3002 | void ImGuiStorage::SetInt(ImGuiID key, int val) |
| 3003 | { |
| 3004 | ImGuiStoragePair* it = ImLowerBound(Data.Data, Data.Data + Data.Size, key); |
| 3005 | if (it == Data.Data + Data.Size || it->key != key) |
| 3006 | Data.insert(it, ImGuiStoragePair(key, val)); |
| 3007 | else |
| 3008 | it->val_i = val; |
| 3009 | } |
| 3010 | |
| 3011 | void ImGuiStorage::SetBool(ImGuiID key, bool val) |
| 3012 | { |
no test coverage detected