]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/dynarray.h
avoid creating and immediately destroying a wxGraphicsContext when creating a wxDC...
[wxWidgets.git] / include / wx / dynarray.h
index 5eced995d9a36a10395c8d4e7609a69043866f0c..d50c7c19e874699b6a887f8eb4ca7ae10c1f8ed8 100644 (file)
@@ -151,7 +151,7 @@ public:                                                             \
                                        e = rend();                  \
           for ( const_reverse_iterator i = b; i != e; ++i )         \
               if ( *i == item )                                     \
-                  return (int)(i - b);                              \
+                  return (int)(e - i - 1);                          \
       }                                                             \
       else                                                          \
       {                                                             \
@@ -546,6 +546,8 @@ public:                                                               \
                                                                       \
   size_t Add(T lItem)                                                 \
     { return base::Add(lItem, (CMPFUNC)m_fnCompare); }                \
+  void push_back(T lItem)                                             \
+    { Add(lItem); }                                                   \
                                                                       \
   void RemoveAt(size_t uiIndex, size_t nRemove = 1)                   \
     { base::erase(begin() + uiIndex, begin() + uiIndex + nRemove); }  \