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