Skip to content

Commit

Permalink
Suppressions: fixed state update of existing suppression in `addSuppr…
Browse files Browse the repository at this point in the history
…ession()` [skip ci]
  • Loading branch information
firewave committed Nov 10, 2023
1 parent cd37df3 commit 375689d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/suppressions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,9 @@ std::string Suppressions::addSuppression(Suppressions::Suppression suppression)
auto foundSuppression = std::find_if(mSuppressions.begin(), mSuppressions.end(),
std::bind(&Suppression::isSameParameters, &suppression, std::placeholders::_1));
if (foundSuppression != mSuppressions.end()) {
// Update matched state of existing global suppression
if (!suppression.isLocal() && suppression.matched)
if (suppression.checked)
foundSuppression->checked = suppression.checked;
if (suppression.matched)
foundSuppression->matched = suppression.matched;
return "";
}
Expand Down

0 comments on commit 375689d

Please sign in to comment.