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. --- base/plugins.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'base/plugins.cpp') diff --git a/base/plugins.cpp b/base/plugins.cpp index 4c2fd2cffc..4413995b88 100644 --- a/base/plugins.cpp +++ b/base/plugins.cpp @@ -540,7 +540,9 @@ void PluginManager::addToPluginsInMemList(Plugin *plugin) { #include "engines/metaengine.h" +namespace Common { DECLARE_SINGLETON(EngineManager); +} /** * This function works for both cached and uncached PluginManagers. @@ -631,7 +633,9 @@ const EnginePlugin::List &EngineManager::getPlugins() const { #include "audio/musicplugin.h" +namespace Common { DECLARE_SINGLETON(MusicManager); +} const MusicPlugin::List &MusicManager::getPlugins() const { return (const MusicPlugin::List &)PluginManager::instance().getPlugins(PLUGIN_TYPE_MUSIC); -- cgit v1.2.3