From a2b04cd7783f96ac6ae23954f5bc40c5491fd35b Mon Sep 17 00:00:00 2001 From: abd Date: Mon, 4 Sep 2006 09:01:43 +0000 Subject: [PATCH] Using run-time type info for compare of Data Owners --- src/SUIT/SUIT_DataOwner.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/SUIT/SUIT_DataOwner.cxx b/src/SUIT/SUIT_DataOwner.cxx index beb907d7a..3090afa91 100755 --- a/src/SUIT/SUIT_DataOwner.cxx +++ b/src/SUIT/SUIT_DataOwner.cxx @@ -55,7 +55,16 @@ bool operator<( const SUIT_DataOwnerPtr& p1, const SUIT_DataOwnerPtr& p2 ) else if ( p2.isNull() ) return false; - return p1->isLess( *p2 ); + //bug with acrossentry of DataOwner and DataSubOwner + const _typeinfo& ti1 = typeid( *(p1.operator->()) ); + const _typeinfo& ti2 = typeid( *(p2.operator->()) ); + + int res = strcmp( ti1.name(), ti2.name() ); + + if ( !res ) + return p1->isLess( *p2 ); + + return res; } /*! -- 2.39.2