X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/62b8a649fcae500c983215fac2e5202916c0195f..HEAD:/lib/base/eptrlist.h diff --git a/lib/base/eptrlist.h b/lib/base/eptrlist.h index ea7e285c..0da46daa 100644 --- a/lib/base/eptrlist.h +++ b/lib/base/eptrlist.h @@ -5,6 +5,7 @@ #include #include #include +#include template class ePtrList : public std::list @@ -57,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; @@ -163,7 +164,7 @@ public: // returns a pointer to this new vector ( the reserved memory must deletet from the receiver !! ) std::vector* v=new std::vector(); v->reserve( std::list::size() ); - for ( std_list_T_iterator it( std::list::begin() ); it != std::list::end(); it++) + for ( std_list_T_iterator it( std::list::begin() ); it != std::list::end(); it++) v->push_back( **it ); return v; @@ -622,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(); @@ -686,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; @@ -1232,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();