No need to test Solvable for being identical with itself.
authorMichael Andres <ma@suse.de>
Fri, 4 Dec 2009 09:43:55 +0000 (10:43 +0100)
committerMichael Andres <ma@suse.de>
Fri, 4 Dec 2009 09:43:55 +0000 (10:43 +0100)
zypp/PoolItem.h
zypp/sat/Solvable.cc

index d8854da..bf10d7d 100644 (file)
@@ -187,7 +187,7 @@ namespace zypp
 
   /** \relates PoolItem Test for same content. */
   inline bool identical( const PoolItem & lhs, const PoolItem & rhs )
-  { return lhs.satSolvable().identical( rhs.satSolvable() ); }
+  { return lhs == rhs || lhs.satSolvable().identical( rhs.satSolvable() ); }
 
   /** \relates PoolItem Test for same content. */
   inline bool identical( const PoolItem & lhs, sat::Solvable rhs )
index c15d169..453875f 100644 (file)
@@ -503,7 +503,7 @@ namespace zypp
     {
       NO_SOLVABLE_RETURN( ! rhs.get() );
       ::_Solvable * rhssolvable( rhs.get() );
-      return rhssolvable && ::solvable_identical( _solvable, rhssolvable );
+      return rhssolvable && ( _solvable == rhssolvable || ::solvable_identical( _solvable, rhssolvable ) );
     }
 
     ///////////////////////////////////////////////////////////////////