MCPcopy Create free account
hub / github.com/KebsCS/KBotExt / Contains

Method Contains

KBotExt/imgui/imgui_internal.h:662–662  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

660 ImPoolIdx GetIndex(const T* p) const { IM_ASSERT(p >= Buf.Data && p < Buf.Data + Buf.Size); return (ImPoolIdx)(p - Buf.Data); }
661 T* GetOrAddByKey(ImGuiID key) { int* p_idx = Map.GetIntRef(key, -1); if (*p_idx != -1) return &Buf[*p_idx]; *p_idx = FreeIdx; return Add(); }
662 bool Contains(const T* p) const { return (p >= Buf.Data && p < Buf.Data + Buf.Size); }
663 void Clear() { for (int n = 0; n < Map.Data.Size; n++) { int idx = Map.Data[n].val_i; if (idx != -1) Buf[idx].~T(); } Map.Clear(); Buf.clear(); FreeIdx = AliveCount = 0; }
664 T* Add() { int idx = FreeIdx; if (idx == Buf.Size) { Buf.resize(Buf.Size + 1); FreeIdx++; } else { FreeIdx = *(int*)&Buf[idx]; } IM_PLACEMENT_NEW(&Buf[idx]) T(); AliveCount++; return &Buf[idx]; }
665 void Remove(ImGuiID key, const T* p) { Remove(key, GetIndex(p)); }

Callers 10

RenderNavHighlightMethod · 0.80
FindHoveredWindowFunction · 0.80
SetItemDefaultFocusMethod · 0.80
IsMouseHoveringRectMethod · 0.80
PlotExMethod · 0.80
GetTabBarRefFromTabBarFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected