| 2820 | } |
| 2821 | |
| 2822 | void** ImGuiStorage::GetVoidPtrRef(ImGuiID key, void* default_val) |
| 2823 | { |
| 2824 | ImGuiStoragePair* it = ImLowerBound(Data.Data, Data.Data + Data.Size, key); |
| 2825 | if (it == Data.Data + Data.Size || it->key != key) |
| 2826 | it = Data.insert(it, ImGuiStoragePair(key, default_val)); |
| 2827 | return &it->val_p; |
| 2828 | } |
| 2829 | |
| 2830 | // 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) |
| 2831 | void ImGuiStorage::SetInt(ImGuiID key, int val) |
nothing calls this directly
no test coverage detected