diff options
| -rw-r--r-- | base/plugins.cpp | 2 | ||||
| -rw-r--r-- | common/config-manager.cpp | 2 | ||||
| -rw-r--r-- | common/singleton.h | 8 | ||||
| -rw-r--r-- | gui/newgui.cpp | 2 | ||||
| -rw-r--r-- | sound/audiocd.cpp | 2 | 
5 files changed, 14 insertions, 2 deletions
| diff --git a/base/plugins.cpp b/base/plugins.cpp index ddc00320c7..08093e0d76 100644 --- a/base/plugins.cpp +++ b/base/plugins.cpp @@ -196,6 +196,8 @@ void DynamicPlugin::unloadPlugin() {  #pragma mark - +DECLARE_SINGLETON(PluginManager); +  PluginManager::PluginManager() {  } diff --git a/common/config-manager.cpp b/common/config-manager.cpp index 5bf26fbe50..fc7bbdfec1 100644 --- a/common/config-manager.cpp +++ b/common/config-manager.cpp @@ -24,6 +24,8 @@  #include "common/config-manager.h" +DECLARE_SINGLETON(Common::ConfigManager); +  #if defined(UNIX)  #ifdef MACOSX  #define DEFAULT_CONFIG_FILE "Library/Preferences/ScummVM Preferences" diff --git a/common/singleton.h b/common/singleton.h index d259102e07..8ea666cbed 100644 --- a/common/singleton.h +++ b/common/singleton.h @@ -55,8 +55,12 @@ protected:  	~Singleton<T>()		{ }  };  -template <class T> -T* Singleton<T>::_singleton=0; +//TODO: The following poses a problem when building ScummVM with plugins... + +//template <class T> +//T* Singleton<T>::_singleton=0; + +#define DECLARE_SINGLETON(T) T* Common::Singleton<T>::_singleton=0  }	// End of namespace Common diff --git a/gui/newgui.cpp b/gui/newgui.cpp index fb6b2f1784..1720e943a8 100644 --- a/gui/newgui.cpp +++ b/gui/newgui.cpp @@ -28,6 +28,8 @@  //#define NEW_FONT_CODE +DECLARE_SINGLETON(GUI::NewGui); +  namespace GUI { diff --git a/sound/audiocd.cpp b/sound/audiocd.cpp index 1084b98fb8..aceed46306 100644 --- a/sound/audiocd.cpp +++ b/sound/audiocd.cpp @@ -57,6 +57,8 @@ static const TrackFormat TRACK_FORMATS[] = {  }; +DECLARE_SINGLETON(AudioCDManager); +  AudioCDManager::AudioCDManager() {  	memset(&_cd, 0, sizeof(_cd));  	memset(_cached_tracks, 0, sizeof(_cached_tracks)); | 
