From: abd Date: Mon, 4 Sep 2006 09:01:43 +0000 (+0000) Subject: Using run-time type info for compare of Data Owners X-Git-Tag: LAST_STABLE_VERSION_21_09_2006_ON_3_2_0~12 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a2b04cd7783f96ac6ae23954f5bc40c5491fd35b;p=modules%2Fgui.git Using run-time type info for compare of Data Owners --- 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; } /*!