Imported Upstream version 15.18.0
[platform/upstream/libzypp.git] / zypp / solver / detail / SATResolver.cc
index 95bab11..77ba113 100644 (file)
@@ -418,22 +418,20 @@ class CheckIfUpdate : public resfilter::PoolItemFilterFunctor
 {
   public:
     bool is_updated;
-    bool multiversion;
     sat::Solvable _installed;
 
-    CheckIfUpdate( sat::Solvable installed_r )
-       : is_updated( false )
-        , multiversion( installed_r.multiversionInstall() )
-        , _installed( installed_r )
+    CheckIfUpdate( const sat::Solvable & installed_r )
+    : is_updated( false )
+    , _installed( installed_r )
     {}
 
     // check this item will be updated
 
-    bool operator()( PoolItem item )
+    bool operator()( const PoolItem & item )
     {
        if ( item.status().isToBeInstalled() )
         {
-          if ( ! multiversion || sameNVRA( _installed, item ) )
+          if ( ! item.multiversionInstall() || sameNVRA( _installed, item ) )
           {
             is_updated = true;
             return false;