]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- coding style
authorArvin Schnell <aschnell@suse.de>
Wed, 25 Jan 2023 08:57:41 +0000 (09:57 +0100)
committerArvin Schnell <aschnell@suse.de>
Wed, 25 Jan 2023 08:57:41 +0000 (09:57 +0100)
zypp-plugin/snapper-zypp-plugin.cc

index 59abcdeed5413694281726de848aff936218c57c..7c044e88c812263b55df4b590202ff1472fa9430 100644 (file)
@@ -383,13 +383,20 @@ SnapperZyppPlugin::match_solvables(const set<string>& solvables, bool& found, bo
 {
     found = false;
     important = false;
-    for (auto s: solvables) {
-       for (auto matcher: solvable_matchers) {
-           if (matcher.match(s)) {
+
+    for (const string& solvable : solvables)
+    {
+       for (const SolvableMatcher& solvable_matcher : solvable_matchers)
+       {
+           if (solvable_matcher.match(solvable))
+           {
                found = true;
-               important = important || matcher.is_important();
-               if (found && important)
+
+               if (solvable_matcher.is_important())
+               {
+                   important = true;
                    return; // short circuit
+               }
            }
        }
     }