From 446d6d2a80638c7bf5dfcb1aa3fc1eb3a2c729ec Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 27 Feb 2018 07:47:54 -0800 Subject: Added helper methods to Bu::List that were missing. --- src/stable/list.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/stable/list.h b/src/stable/list.h index 7e41581..5b5b7e9 100644 --- a/src/stable/list.h +++ b/src/stable/list.h @@ -703,11 +703,21 @@ namespace Bu { return *(pLink->pValue); } + + const value &operator*() const + { + return *(pLink->pValue); + } const value *operator->() { return pLink->pValue; } + + const value *operator->() const + { + return pLink->pValue; + } const_iterator &operator++() { @@ -813,6 +823,17 @@ namespace Bu return const_iterator( core->pFirst ); } + iterator rbegin() + { + _hardCopy(); + return iterator( core->pLast ); + } + + const_iterator rbegin() const + { + return const_iterator( core->pLast ); + } + /** * Get an iterator pointing to a place just past the last item in * the list. -- cgit v1.2.3