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)
| 1970 | |
| 1971 | // 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) |
| 1972 | void ImGuiStorage::SetInt(ImGuiID key, int val) |
| 1973 | { |
| 1974 | ImGuiStoragePair* it = LowerBound(Data, key); |
| 1975 | if (it == Data.end() || it->key != key) |
| 1976 | { |
| 1977 | Data.insert(it, ImGuiStoragePair(key, val)); |
| 1978 | return; |
| 1979 | } |
| 1980 | it->val_i = val; |
| 1981 | } |
| 1982 | |
| 1983 | void ImGuiStorage::SetBool(ImGuiID key, bool val) |
| 1984 | { |
no test coverage detected