MCPcopy Create free account
hub / github.com/SunOner/sunone_aimbot_2 / GetIntRef

Method GetIntRef

sunone_aimbot_2/imgui/imgui.cpp:2972–2978  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

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.
2972int* ImGuiStorage::GetIntRef(ImGuiID key, int default_val)
2973{
2974 ImGuiStoragePair* it = ImLowerBound(Data.Data, Data.Data + Data.Size, key);
2975 if (it == Data.Data + Data.Size || it->key != key)
2976 it = Data.insert(it, ImGuiStoragePair(key, default_val));
2977 return &it->val_i;
2978}
2979
2980bool* ImGuiStorage::GetBoolRef(ImGuiID key, bool default_val)
2981{

Callers 3

ItemAddMethod · 0.45
SetItemSelectedMethod · 0.45
GetOrAddByKeyMethod · 0.45

Calls 2

ImLowerBoundFunction · 0.70
ImGuiStoragePairClass · 0.70

Tested by

no test coverage detected