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/debug.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common/debug.cpp') diff --git a/common/debug.cpp b/common/debug.cpp index 0dae344bb2..50f99753db 100644 --- a/common/debug.cpp +++ b/common/debug.cpp @@ -29,10 +29,10 @@ // TODO: Move gDebugLevel into namespace Common. int gDebugLevel = -1; -DECLARE_SINGLETON(Common::DebugManager); - namespace Common { +DECLARE_SINGLETON(DebugManager); + namespace { struct DebugLevelComperator { -- cgit v1.2.3 From 7e4224e52a2202ba98dd93ffe209d231e5c1d35c Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 3 Jul 2011 00:15:30 +0200 Subject: COMMON: Fix compilation when USE_HASHMAP_MEMORY_POOL is not defined. --- common/debug.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'common/debug.cpp') diff --git a/common/debug.cpp b/common/debug.cpp index 50f99753db..9c3a93e5a6 100644 --- a/common/debug.cpp +++ b/common/debug.cpp @@ -23,6 +23,7 @@ #include "common/debug-channels.h" #include "common/system.h" #include "common/textconsole.h" +#include "common/algorithm.h" #include // For va_list etc. -- cgit v1.2.3