X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d13b34d3f2be575d59747a5926000be7b28a45dc..0555b2a0a3c509687e7fc5aeb160f5171b7e6311:/include/wx/dynarray.h?ds=sidebyside diff --git a/include/wx/dynarray.h b/include/wx/dynarray.h index 5eced995d9..d50c7c19e8 100644 --- a/include/wx/dynarray.h +++ b/include/wx/dynarray.h @@ -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); } \