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

Method Add

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

Source from the content-addressed store, hash-verified

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)); }
666 void Remove(ImGuiID key, ImPoolIdx idx) { Buf[idx].~T(); *(int*)&Buf[idx] = FreeIdx; FreeIdx = idx; Map.SetInt(key, -1); AliveCount--; }
667 void Reserve(int capacity) { Buf.reserve(capacity); Map.Data.reserve(capacity); }

Callers 6

CalcListClippingMethod · 0.80
NewFrameMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected