X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1311c7a9bbaefda6b68eee5c32c3309f163a8861..dd1eaa89dd33ca69086b8a4f3f350d36f8a922f0:/include/wx/dynarray.h?ds=sidebyside diff --git a/include/wx/dynarray.h b/include/wx/dynarray.h index a73954ae73..58002387fd 100644 --- a/include/wx/dynarray.h +++ b/include/wx/dynarray.h @@ -172,6 +172,8 @@ public: \ { return (T&)(wxBaseArray::Item(uiIndex)); } \ T& Item(uint uiIndex) const \ { return (T&)(wxBaseArray::Item(uiIndex)); } \ + T& Last() const \ + { return (T&)(wxBaseArray::Item(Count() - 1)); } \ \ int Index(T Item, bool bFromEnd = FALSE) const \ { return wxBaseArray::Index((long)Item, bFromEnd); } \ @@ -209,6 +211,8 @@ public: \ { return *(T*)wxBaseArray::Item(uiIndex); } \ T& Item(uint uiIndex) const \ { return *(T*)wxBaseArray::Item(uiIndex); } \ + T& Last() const \ + { return *(T*)(wxBaseArray::Item(Count() - 1)); } \ \ int Index(const T& Item, bool bFromEnd = FALSE) const; \ \