From eff225a09c77ce8d23d9c59276cfec14f8f7807e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 10 Apr 2020 13:48:38 +0200 Subject: [PATCH] Use 'static' instead of unnamed namespace for variables --- lib/checkclass.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 {