Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
danmar committed Oct 13, 2023
1 parent 1c590b9 commit 530aa62
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/suppressions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,16 +400,15 @@ std::string Suppressions::Suppression::getText() const
bool Suppressions::isSuppressed(const Suppressions::ErrorMessage &errmsg, bool global)
{
const bool unmatchedSuppression(errmsg.errorId == "unmatchedSuppression");
bool returnValue = false;
for (Suppression &s : mSuppressions) {
if (!global && !s.isLocal())
continue;
if (unmatchedSuppression && s.errorId != errmsg.errorId)
continue;
if (s.isMatch(errmsg))
returnValue = true;
return true;
}
return returnValue;
return false;
}

bool Suppressions::isSuppressed(const ::ErrorMessage &errmsg)
Expand Down

0 comments on commit 530aa62

Please sign in to comment.