]> git.saurik.com Git - wxWidgets.git/commitdiff
re-added wxVector<T>::erase(size_t) for backward compatibility
authorVáclav Slavík <vslavik@fastmail.fm>
Tue, 21 Aug 2007 10:59:42 +0000 (10:59 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Tue, 21 Aug 2007 10:59:42 +0000 (10:59 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48274 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/vector.h

index 422e751b84f3b360995c66e55ed70bbcdfc993ac..880dd9bbcda6908c8a3748a4088c3709cf9e7a80 100644 (file)
@@ -126,6 +126,10 @@ public:
         return begin() + idx;
     }
 
+#if WXWIN_COMPATIBILITY_2_8
+    wxDEPRECATED( size_type erase(size_type n) );
+#endif // WXWIN_COMPATIBILITY_2_8
+
     iterator insert(iterator it, const value_type& v = value_type())
     {
         wxCHECK2(Alloc(size() + 1), return 0);
@@ -223,6 +227,15 @@ private:
     value_type **m_objects;
 };
 
+#if WXWIN_COMPATIBILITY_2_8
+template<typename T>
+typename wxVector<T>::size_type wxVector<T>::erase(size_type n)
+{
+    RemoveAt(n);
+    return n;
+}
+#endif // WXWIN_COMPATIBILITY_2_8
+
 #endif // wxUSE_STL/!wxUSE_STL
 
 #if WXWIN_COMPATIBILITY_2_8