X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FBaseObjects%2FObject.cxx;h=9fffab63e44e0c487623ccb68defbcd3aff5bcd3;hb=b96732896f4c247203f79dbb22e770873b0eedb8;hp=e372c99747f1584e611479ea0efb9dd5014e5575;hpb=514419c89876aa75880cabee60c14f7582b1d33c;p=cpPlugins.git diff --git a/lib/cpPlugins/BaseObjects/Object.cxx b/lib/cpPlugins/BaseObjects/Object.cxx index e372c99..9fffab6 100644 --- a/lib/cpPlugins/BaseObjects/Object.cxx +++ b/lib/cpPlugins/BaseObjects/Object.cxx @@ -42,20 +42,23 @@ Modified( ) const itk::ModifiedTimeType cpPlugins::BaseObjects::Object:: GetMTime( ) const { + itk::ModifiedTimeType lt = this->Superclass::GetMTime( ); const itk::Object* i = this->GetITK< itk::Object >( ); vtkObject* v = const_cast< vtkObject* >( this->GetVTK< vtkObject >( ) ); + + itk::ModifiedTimeType rt; if( i != NULL && v == NULL ) - return( i->GetMTime( ) ); + rt = i->GetMTime( ); else if( i == NULL && v != NULL ) - return( v->GetMTime( ) ); + rt = v->GetMTime( ); else if( i != NULL && v != NULL ) { auto iTime = i->GetMTime( ); auto vTime = v->GetMTime( ); - return( itk::ModifiedTimeType( ( iTime < vTime )? vTime: iTime ) ); - } - else - return( this->Superclass::GetMTime( ) ); + rt = ( iTime < vTime )? vTime: iTime; + + } // fi + return( ( lt < rt )? rt: lt ); } // -------------------------------------------------------------------------