diff --git a/lib/checkclass.cpp b/lib/checkclass.cpp index b32eb0d80..16542edd8 100644 --- a/lib/checkclass.cpp +++ b/lib/checkclass.cpp @@ -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 stl_containers_not_const = { "map", "unordered_map" }; -} + +// The container contains the STL types whose operator[] is not a const. +static const std::set stl_containers_not_const = { "map", "unordered_map" }; bool CheckClass::checkConstFunc(const Scope *scope, const Function *func, bool& memberAccessed) const {