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)
| 1909 | |
| 1910 | // 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) |
| 1911 | void ImGuiStorage::SetInt(ImGuiID key, int val) |
| 1912 | { |
| 1913 | ImGuiStoragePair* it = LowerBound(Data, key); |
| 1914 | if (it == Data.end() || it->key != key) |
| 1915 | { |
| 1916 | Data.insert(it, ImGuiStoragePair(key, val)); |
| 1917 | return; |
| 1918 | } |
| 1919 | it->val_i = val; |
| 1920 | } |
| 1921 | |
| 1922 | void ImGuiStorage::SetBool(ImGuiID key, bool val) |
| 1923 | { |
no test coverage detected