mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-24 02:14:22 +00:00
ImVector: Revert 6172e93272 actually problematic with our current use (because we don't construct the instances).
This commit is contained in:
parent
d976e4ea23
commit
e9ceef4762
1 changed files with 2 additions and 4 deletions
6
imgui.h
6
imgui.h
|
|
@ -1018,10 +1018,8 @@ public:
|
|||
typedef value_type* iterator;
|
||||
typedef const value_type* const_iterator;
|
||||
|
||||
inline ImVector() { Size = Capacity = 0; Data = NULL; }
|
||||
inline ~ImVector() { if (Data) ImGui::MemFree(Data); }
|
||||
inline ImVector(const ImVector<T>& rhs) { Size = Capacity = 0; Data = NULL; if (rhs.Size) { resize(rhs.Size); memcpy(Data, rhs.Data, (size_t)rhs.Size * sizeof(T)); } }
|
||||
inline ImVector<T>& operator=(const ImVector<T>& rhs) { resize(rhs.Size); if (rhs.Size) memcpy(Data, rhs.Data, (size_t)rhs.Size * sizeof(T)); return *this; }
|
||||
inline ImVector() { Size = Capacity = 0; Data = NULL; }
|
||||
inline ~ImVector() { if (Data) ImGui::MemFree(Data); }
|
||||
|
||||
inline bool empty() const { return Size == 0; }
|
||||
inline int size() const { return Size; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue