Skip to content

Commit ac29a36

Browse files
committed
Simplify conditional setting of flag
1 parent 41a2888 commit ac29a36

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

k4FWCore/src/KeepDropSwitch.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,9 @@ bool KeepDropSwitch::isOn(const std::string& astring) const {
9292
bool KeepDropSwitch::getFlag(const std::string& astring) const noexcept {
9393
bool flag = true;
9494
for (const auto& [cmd, pattern] : m_commandlines) {
95-
bool match = wildcmp(pattern.c_str(), astring.c_str());
96-
if (not match)
97-
continue;
98-
flag = (cmd == Cmd::KEEP);
95+
if (wildcmp(pattern.c_str(), astring.c_str())) {
96+
flag = (cmd == Cmd::KEEP);
97+
}
9998
}
10099
return flag;
101100
}

0 commit comments

Comments
 (0)