diff --git a/alib2data/src/common/wrapper.hpp b/alib2data/src/common/wrapper.hpp index f4de62a881330ec923e6c5f71841220a2a4596bd..fc2b25d6da0456ac5964a574ca97844c1a1c952e 100644 --- a/alib2data/src/common/wrapper.hpp +++ b/alib2data/src/common/wrapper.hpp @@ -52,39 +52,27 @@ public: } bool operator >=( const wrapper & other ) const { - if ( this->data.get ( ) == other.data.get ( ) ) return true; - - return * ( this->data ) >= * ( other.data ); + return this->compare(other) >= 0; } bool operator <=( const wrapper & other ) const { - if ( this->data.get ( ) == other.data.get ( ) ) return true; - - return * ( this->data ) <= * ( other.data ); + return this->compare(other) <= 0; } bool operator >( const wrapper & other ) const { - if ( this->data.get ( ) == other.data.get ( ) ) return false; - - return * ( this->data ) > * ( other.data ); + return this->compare(other) > 0; } bool operator <( const wrapper & other ) const { - if ( this->data.get ( ) == other.data.get ( ) ) return false; - - return * ( this->data ) < * ( other.data ); + return this->compare(other) < 0; } bool operator !=( const wrapper & other ) const { - if ( this->data.get ( ) == other.data.get ( ) ) return false; - - return * ( this->data ) != * ( other.data ); + return this->compare(other) != 0; } bool operator ==( const wrapper & other ) const { - if ( this->data.get ( ) == other.data.get ( ) ) return true; - - return * ( this->data ) == * ( other.data ); + return this->compare(other) == 0; } int compare ( const wrapper & other ) const {