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

Function push_back

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

NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.

Source from the content-addressed store, hash-verified

1879
1880 // NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
1881 inline void push_back(const T& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); memcpy(&Data[Size], &v, sizeof(v)); Size++; }
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; }

Callers 6

push_backMethod · 0.85
push_backMethod · 0.85
push_backMethod · 0.85
push_frontFunction · 0.85
operator+=Method · 0.85
push_backMethod · 0.85

Calls 2

_grow_capacityFunction · 0.85
reserveFunction · 0.70

Tested by

no test coverage detected