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

Method GetByIndex

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

Source from the content-addressed store, hash-verified

657 ~ImPool() { Clear(); }
658 T* GetByKey(ImGuiID key) { int idx = Map.GetInt(key, -1); return (idx != -1) ? &Buf[idx] : NULL; }
659 T* GetByIndex(ImPoolIdx n) { return &Buf[n]; }
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); }

Callers 4

EndTableMethod · 0.80
SetCurrentWindowFunction · 0.80
NewFrameMethod · 0.80
GetTabBarFromTabBarRefFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected