From: Vadim Zeitlin Date: Fri, 27 Jul 2007 00:17:27 +0000 (+0000) Subject: compilation fix for insert() X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f631cd8e128925bbf43b57b3dec0cd5ca217bdaf?ds=inline compilation fix for insert() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/vector.h b/include/wx/vector.h index e3792543e6..422e751b84 100644 --- a/include/wx/vector.h +++ b/include/wx/vector.h @@ -120,17 +120,17 @@ public: return begin() + idx; } iterator erase(iterator it) - { + { size_type idx = it - begin(); RemoveAt(idx); return begin() + idx; } - + iterator insert(iterator it, const value_type& v = value_type()) { wxCHECK2(Alloc(size() + 1), return 0); size_type idx = it - begin(); - InsertAt(new value_type(o), idx); + InsertAt(new value_type(v), idx); return begin() + idx; } @@ -168,7 +168,7 @@ private: m_objects + idx + 1, m_objects + idx, ( m_size - idx ) * sizeof(value_type*) ); - + m_size++; } @@ -183,7 +183,7 @@ private: ( m_size - idx - 1 ) * sizeof(value_type*) ); m_size--; } - + void RemoveAt(size_type idx, size_type count) { if (count == 0)