Fix our DECLARE_SINGLETON macro to conform to the C++ specs.

We need to use a namespace Common { } there to make strict C++ compilers
like clang++ and comeau happy. I also added a slight comment about why
that is needed to the macro definition and a note that you need to use
it from the global namespace.

svn-id: r48254
This commit is contained in:
Johannes Schickel 2010-03-13 21:55:49 +00:00
parent 958fa8d5cb
commit 40562798d6
16 changed files with 31 additions and 19 deletions

View file

@ -283,7 +283,7 @@ void FilePluginProvider::addCustomDirectories(Common::FSList &dirs) const {
#pragma mark -
DECLARE_SINGLETON(PluginManager);
DECLARE_SINGLETON(PluginManager)
PluginManager::PluginManager() {
// Always add the static plugin provider.
@ -375,7 +375,7 @@ bool PluginManager::tryLoadPlugin(Plugin *plugin) {
#include "engines/metaengine.h"
DECLARE_SINGLETON(EngineManager);
DECLARE_SINGLETON(EngineManager)
GameDescriptor EngineManager::findGame(const Common::String &gameName, const EnginePlugin **plugin) const {
// Find the GameDescriptor for this target
@ -421,7 +421,7 @@ const EnginePlugin::List &EngineManager::getPlugins() const {
#include "sound/musicplugin.h"
DECLARE_SINGLETON(MusicManager);
DECLARE_SINGLETON(MusicManager)
const MusicPlugin::List &MusicManager::getPlugins() const {
return (const MusicPlugin::List &)PluginManager::instance().getPlugins(PLUGIN_TYPE_MUSIC);