]> git.saurik.com Git - wxWidgets.git/commitdiff
Last() function added (the same as Item(Count() - 1))
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 8 Jul 1998 22:37:57 +0000 (22:37 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 8 Jul 1998 22:37:57 +0000 (22:37 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@203 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/dynarray.h

index a73954ae7365bb0ed9d9b170246668673af474d7..58002387fd0ace91e79c5cb6e1f2e949523d5903 100644 (file)
@@ -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;            \
                                                                     \