| 2831 | } |
| 2832 | |
| 2833 | void* ImGuiStorage::GetVoidPtr(ImGuiID key) const |
| 2834 | { |
| 2835 | ImGuiStoragePair* it = ImLowerBound(const_cast<ImGuiStoragePair*>(Data.Data), const_cast<ImGuiStoragePair*>(Data.Data + Data.Size), key); |
| 2836 | if (it == Data.Data + Data.Size || it->key != key) |
| 2837 | return NULL; |
| 2838 | return it->val_p; |
| 2839 | } |
| 2840 | |
| 2841 | // References are only valid until a new value is added to the storage. Calling a Set***() function or a Get***Ref() function invalidates the pointer. |
| 2842 | int* ImGuiStorage::GetIntRef(ImGuiID key, int default_val) |
no test coverage detected