X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c9faa9e9a2cc88379a86e3e2ed731eadba948084..b053bf9ef4fa93ede7869438fa61e664b453ef18:/include/wx/vector.h?ds=sidebyside diff --git a/include/wx/vector.h b/include/wx/vector.h index e8a6b3c573..df491781a0 100644 --- a/include/wx/vector.h +++ b/include/wx/vector.h @@ -104,7 +104,7 @@ template class wxVector { private: - // Tthis cryptic expression means "typedef Ops to wxVectorMemOpsMovable if + // This cryptic expression means "typedef Ops to wxVectorMemOpsMovable if // type T is movable type, otherwise to wxVectorMemOpsGeneric". // // Note that we use typedef instead of privately deriving from this (which @@ -124,7 +124,7 @@ public: wxVector() : m_size(0), m_capacity(0), m_values(NULL) {} - wxVector(const wxVector& c) + wxVector(const wxVector& c) : m_size(0), m_capacity(0), m_values(NULL) { Copy(c); } @@ -144,7 +144,8 @@ public: Ops::Free(m_values); m_values = NULL; - m_size = m_capacity = 0; + m_size = + m_capacity = 0; } void reserve(size_type n) @@ -184,6 +185,7 @@ public: wxVector& operator=(const wxVector& vb) { + clear(); Copy(vb); return *this; } @@ -321,7 +323,6 @@ private: void Copy(const wxVector& vb) { - clear(); reserve(vb.size()); for ( const_iterator i = vb.begin(); i != vb.end(); ++i )