| 2961 | } |
| 2962 | |
| 2963 | void* ImGuiStorage::GetVoidPtr(ImGuiID key) const |
| 2964 | { |
| 2965 | ImGuiStoragePair* it = ImLowerBound(const_cast<ImGuiStoragePair*>(Data.Data), const_cast<ImGuiStoragePair*>(Data.Data + Data.Size), key); |
| 2966 | if (it == Data.Data + Data.Size || it->key != key) |
| 2967 | return NULL; |
| 2968 | return it->val_p; |
| 2969 | } |
| 2970 | |
| 2971 | // 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. |
| 2972 | int* ImGuiStorage::GetIntRef(ImGuiID key, int default_val) |
no test coverage detected