From 8a85b18283beef59d2a79ba88d0d965f947f75fb Mon Sep 17 00:00:00 2001 From: Greg Hewgill Date: Tue, 15 Feb 2011 23:05:27 +0000 Subject: [PATCH] use suppression wildcard glob instead of special-case empty filename --- lib/settings.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/settings.cpp b/lib/settings.cpp index dbd4f37c7..4b6f26c84 100644 --- a/lib/settings.cpp +++ b/lib/settings.cpp @@ -207,6 +207,10 @@ std::string Settings::Suppressions::FileMatcher::addFile(const std::string &name } _globs[name].insert(line); } + else if (name.empty()) + { + _globs["*"].insert(0U); + } else { _files[name].insert(line); @@ -216,10 +220,6 @@ std::string Settings::Suppressions::FileMatcher::addFile(const std::string &name bool Settings::Suppressions::FileMatcher::isSuppressed(const std::string &file, unsigned int line) { - // Check are all errors of this type filtered out - if (_files.find("") != _files.end()) - return true; - std::set lineset; std::map >::const_iterator f = _files.find(file);