X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/df4aed1cf0fbf5c8be67416a9478132fbb559c72..278d7ab4469db37ed930b66ebb2fd962133fe49d:/include/wx/vector.h 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)