From aa0f307e06e5aae3b12f9f15b350dc81b30d61de Mon Sep 17 00:00:00 2001 From: Ori Avtalion Date: Tue, 28 Jun 2011 02:06:23 +0300 Subject: ALL: Require DECLARE_SINGLETON to be used in the Common namepsace Silences the clang warning: static data member specialization of '_singleton' must originally be declared in namespace 'Common'; accepted as a C++0x extension [-Wc++0x-extensions] Wrapping "namespace Common {}" around the macro assignment causes clang to complain about a spurious semicolon, and removing the semicolon at the end of the macro causes some editors to misbehave. Changing the requirement of using the macro in one namespace (the global) to another (Common) seems a small price to pay to silence a warning. --- common/config-manager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common/config-manager.cpp') diff --git a/common/config-manager.cpp b/common/config-manager.cpp index a9d8c89035..fbdb611f3c 100644 --- a/common/config-manager.cpp +++ b/common/config-manager.cpp @@ -27,8 +27,6 @@ #include "common/system.h" #include "common/textconsole.h" -DECLARE_SINGLETON(Common::ConfigManager); - static bool isValidDomainName(const Common::String &domName) { const char *p = domName.c_str(); while (*p && (isalnum(static_cast(*p)) || *p == '-' || *p == '_')) @@ -38,6 +36,8 @@ static bool isValidDomainName(const Common::String &domName) { namespace Common { +DECLARE_SINGLETON(ConfigManager); + const char *ConfigManager::kApplicationDomain = "scummvm"; const char *ConfigManager::kTransientDomain = "__TRANSIENT"; -- cgit v1.2.3