From c85112bdad59a04adcec355747e203a35327fe77 Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Thu, 6 Aug 2015 17:10:43 +0300 Subject: [PATCH] Break list traversal once first match is found --- lib/errorlogger.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/errorlogger.cpp b/lib/errorlogger.cpp index 30c7294dd..3b59f83f4 100644 --- a/lib/errorlogger.cpp +++ b/lib/errorlogger.cpp @@ -366,8 +366,10 @@ void ErrorLogger::reportUnmatchedSuppressions(const std::list::const_iterator i2 = unmatched.begin(); i2 != unmatched.end(); ++i2) { if (i2->id == "unmatchedSuppression") { if ((i2->file == "*" || i2->file == i->file) && - (i2->line == 0 || i2->line == i->line)) + (i2->line == 0 || i2->line == i->line)) { suppressed = true; + break; + } } }