From 936231df33baf5f16adb58b3e19de30332aae398 Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Thu, 17 Apr 2008 11:46:51 +0000 Subject: [PATCH] make some operator functions const --- lib/base/eptrlist.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/base/eptrlist.h b/lib/base/eptrlist.h index 7e7a45a..7512305 100644 --- a/lib/base/eptrlist.h +++ b/lib/base/eptrlist.h @@ -58,8 +58,8 @@ public: inline const T* last() const; // added operator methods - inline operator bool(); - inline bool operator!(); + inline operator bool() const; + inline bool operator!() const; // added compare struct ... to sort struct less; @@ -623,14 +623,14 @@ struct ePtrList::less /////////////////// ePtrList operator bool //////////////////// template -ePtrList::operator bool() +ePtrList::operator bool() const { // Returns a bool that contains true, when the list is NOT empty otherwise false return !std::list::empty(); } template -bool ePtrList::operator!() +bool ePtrList::operator!() const { // Returns a bool that contains true, when the list is empty otherwise false return std::list::empty(); @@ -687,8 +687,8 @@ public: inline const T* last() const; // added operator methods - inline operator bool(); - inline bool operator!(); + inline operator bool() const; + inline bool operator!() const; // added compare struct ... to sort struct less; @@ -1233,14 +1233,14 @@ struct eSmartPtrList::less /////////////////// eSmartPtrList operator bool //////////////////// template -eSmartPtrList::operator bool() +eSmartPtrList::operator bool() const { // Returns a bool that contains true, when the list is NOT empty otherwise false return !std::list::empty(); } template -bool eSmartPtrList::operator!() +bool eSmartPtrList::operator!() const { // Returns a bool that contains true, when the list is empty otherwise false return std::list::empty(); -- 2.7.4