From 5df9f2d693fe672e22c503056e72fae86da1861c Mon Sep 17 00:00:00 2001 From: asl Date: Mon, 3 Apr 2006 10:20:32 +0000 Subject: [PATCH] new operator< --- src/SUIT/SUIT_DataOwner.cxx | 8 +++++--- src/SUIT/SUIT_DataOwner.h | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/SUIT/SUIT_DataOwner.cxx b/src/SUIT/SUIT_DataOwner.cxx index 28ceb5153..7376dcd20 100755 --- a/src/SUIT/SUIT_DataOwner.cxx +++ b/src/SUIT/SUIT_DataOwner.cxx @@ -41,6 +41,7 @@ SUIT_DataOwner::~SUIT_DataOwner() { } + /*! operator== : compares two owners*/ bool operator==( const SUIT_DataOwnerPtr& p1, const SUIT_DataOwnerPtr& p2 ) { @@ -158,8 +159,8 @@ void SUIT_DataOwnerPtrList::clear() //==================================================================== uint SUIT_DataOwnerPtrList::remove(const SUIT_DataOwnerPtr& x ) { - if( mySkipEqual && myMap.contains(x) ) - myMap.remove(x); + if( mySkipEqual && myMap.contains( x ) ) + myMap.remove( x ); return QValueList::remove( x ); } @@ -168,5 +169,6 @@ uint SUIT_DataOwnerPtrList::remove(const SUIT_DataOwnerPtr& x ) //==================================================================== bool operator<( const SUIT_DataOwnerPtr& p1, const SUIT_DataOwnerPtr& p2 ) { - return p1.get()operator<( *p2 ); } + diff --git a/src/SUIT/SUIT_DataOwner.h b/src/SUIT/SUIT_DataOwner.h index cbc5b8464..d1c4e5529 100755 --- a/src/SUIT/SUIT_DataOwner.h +++ b/src/SUIT/SUIT_DataOwner.h @@ -36,6 +36,7 @@ public: virtual ~SUIT_DataOwner();//!< destructor //! compare function virtual bool isEqual( const SUIT_DataOwner& ) const = 0; + virtual bool operator<( const SUIT_DataOwner& ) const = 0; }; /*! \typedef SUIT_DataOwnerPtr -- 2.39.2