mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-18 06:06:35 +00:00
ImVector comment (#1577)
This commit is contained in:
parent
2d9d7a10ca
commit
578016d08b
1
imgui.h
1
imgui.h
@ -1073,6 +1073,7 @@ public:
|
||||
Capacity = new_capacity;
|
||||
}
|
||||
|
||||
// NB: &v cannot be pointing inside the ImVector Data itself! e.g. v.push_back(v[10]) is forbidden.
|
||||
inline void push_back(const value_type& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); Data[Size++] = v; }
|
||||
inline void pop_back() { IM_ASSERT(Size > 0); Size--; }
|
||||
inline void push_front(const value_type& v) { if (Size == 0) push_back(v); else insert(Data, v); }
|
||||
|
Loading…
Reference in New Issue
Block a user