ImVector comment (#1577)

This commit is contained in:
omar 2018-01-27 17:26:25 +01:00
parent 2d9d7a10ca
commit 578016d08b

View File

@ -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); }