MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/PositionBasedDynamics / erase

Function erase

extern/imgui/imgui.h:1884–1884  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1882 inline void pop_back() { IM_ASSERT(Size > 0); Size--; }
1883 inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); }
1884 inline T* erase(const T* it) { IM_ASSERT(it >= Data && it < Data + Size); const ptrdiff_t off = it - Data; memmove(Data + off, Data + off + 1, ((size_t)Size - (size_t)off - 1) * sizeof(T)); Size--; return Data + off; }
1885 inline T* erase(const T* it, const T* it_last){ IM_ASSERT(it >= Data && it < Data + Size && it_last >= it && it_last <= Data + Size); const ptrdiff_t count = it_last - it; const ptrdiff_t off = it - Data; memmove(Data + off, Data + off + count, ((size_t)Size - (size_t)off - (size_t)count) * sizeof(T)); Size -= (int)count; return Data + off; }
1886 inline T* erase_unsorted(const T* it) { IM_ASSERT(it >= Data && it < Data + Size); const ptrdiff_t off = it - Data; if (it < Data + Size - 1) memcpy(Data + off, Data + Size - 1, sizeof(T)); Size--; return Data + off; }
1887 inline T* insert(const T* it, const T& v) { IM_ASSERT(it >= Data && it <= Data + Size); const ptrdiff_t off = it - Data; if (Size == Capacity) reserve(_grow_capacity(Size + 1)); if (off < (int)Size) memmove(Data + off + 1, Data + off, ((size_t)Size - (size_t)off) * sizeof(T)); memcpy(&Data[off], &v, sizeof(v)); Size++; return Data + off; }

Callers 3

resizeMethod · 0.85
resizeMethod · 0.85
find_eraseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected