Use 'static' instead of unnamed namespace for variables

This commit is contained in:
Daniel Marjamäki 2020-04-10 13:48:38 +02:00
parent b67a043e5b
commit eff225a09c
1 changed files with 3 additions and 4 deletions

View File

@ -2021,10 +2021,9 @@ bool CheckClass::isConstMemberFunc(const Scope *scope, const Token *tok) const
return false;
}
namespace {
// The container contains the STL types whose operator[] is not a const.
const std::set<std::string> stl_containers_not_const = { "map", "unordered_map" };
}
// The container contains the STL types whose operator[] is not a const.
static const std::set<std::string> stl_containers_not_const = { "map", "unordered_map" };
bool CheckClass::checkConstFunc(const Scope *scope, const Function *func, bool& memberAccessed) const
{