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

Method Reserve

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

Source from the content-addressed store, hash-verified

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); }
668
669 // To iterate a ImPool: for (int n = 0; n < pool.GetMapSize(); n++) if (T* t = pool.TryGetMapData(n)) { ... }
670 // Can be avoided if you know .Remove() has never been called on the pool, or AliveCount == GetMapSize()

Callers 1

TableBeginInitMemoryMethod · 0.45

Calls 1

reserveMethod · 0.80

Tested by

no test coverage detected