From: Arvin Schnell Date: Wed, 25 Jan 2023 08:57:41 +0000 (+0100) Subject: - coding style X-Git-Tag: v0.10.5~62^2~1 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=8d2d11e7908b6474be172a60b2c8be8b28a2d640;p=thirdparty%2Fsnapper.git - coding style --- diff --git a/zypp-plugin/snapper-zypp-plugin.cc b/zypp-plugin/snapper-zypp-plugin.cc index 59abcdee..7c044e88 100644 --- a/zypp-plugin/snapper-zypp-plugin.cc +++ b/zypp-plugin/snapper-zypp-plugin.cc @@ -383,13 +383,20 @@ SnapperZyppPlugin::match_solvables(const set& 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 + } } } }