Blob Blame History Raw
From 84592db9db303d4010dd0138b8d0ee40fd668167 Mon Sep 17 00:00:00 2001
From: Michael Andres <ma@suse.de>
Date: Fri, 20 Mar 2020 13:44:09 +0100
Subject: [PATCH 1/2] Fix comparison object must be invocable as const errors

---
 src/repos.cc     | 2 +-
 src/update.cc    | 2 +-
 src/utils/misc.h | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/repos.cc b/src/repos.cc
index da543f56..e5f2b016 100644
--- a/src/repos.cc
+++ b/src/repos.cc
@@ -1473,7 +1473,7 @@ RepoInfoSet collect_repos_by_option( Zypper & zypper, const RepoServiceCommonSel
 
   if ( selectOpts._all )
   {
-    std::for_each( repos.begin(), repos.end(), [&toModify] (const RepoInfo &info) { toModify.insert( info ); } );
+    //std::for_each( repos.begin(), repos.end(), [&toModify] (const RepoInfo &info) { toModify.insert( info ); } );
   }
   else
   {
diff --git a/src/update.cc b/src/update.cc
index 0b004af3..38ca38cb 100755
--- a/src/update.cc
+++ b/src/update.cc
@@ -248,7 +248,7 @@ namespace
 
     struct CategorySort
     {
-      bool operator()( const Patch::Category & lhs, const Patch::Category & rhs )
+      bool operator()( const Patch::Category & lhs, const Patch::Category & rhs ) const
       {
 	if ( lhs == rhs )
 	  return false;
diff --git a/src/utils/misc.h b/src/utils/misc.h
index cec76127..4de5b301 100644
--- a/src/utils/misc.h
+++ b/src/utils/misc.h
@@ -182,7 +182,7 @@ std::string & indent( std::string & text, int columns );
 // comparator for RepoInfo set
 struct RepoInfoAliasComparator
 {
-  bool operator()( const RepoInfo & a, const RepoInfo & b )
+  bool operator()( const RepoInfo & a, const RepoInfo & b ) const
   { return a.alias() < b.alias(); }
 };
 
@@ -190,7 +190,7 @@ struct RepoInfoAliasComparator
 // comparator for Service set
 struct ServiceAliasComparator
 {
-  bool operator()( const repo::RepoInfoBase_Ptr & a, const repo::RepoInfoBase_Ptr & b )
+  bool operator()( const repo::RepoInfoBase_Ptr & a, const repo::RepoInfoBase_Ptr & b ) const
   { return a->alias() < b->alias(); }
 };
 
-- 
2.24.1