diff options
author | Thierry Crozat | 2017-07-03 18:59:12 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2017-07-10 21:11:20 +0200 |
commit | eefa72afa1978a9dea10f5b1833fcc8f58a3468e (patch) | |
tree | 97ef0c982cad7cc54cf93c0f6a6cec3d072b1a69 /backends | |
parent | 1141bfc1a603decce8f02a85a1fc76073a646d1a (diff) | |
download | scummvm-rg350-eefa72afa1978a9dea10f5b1833fcc8f58a3468e.tar.gz scummvm-rg350-eefa72afa1978a9dea10f5b1833fcc8f58a3468e.tar.bz2 scummvm-rg350-eefa72afa1978a9dea10f5b1833fcc8f58a3468e.zip |
COMMON: Change way the Singleton instances are instantiated
This fixes tons of warnings with clang from a recent xcode version on
macOS (and possibly other systems) complaining that an instantiation
of _singleton is required but no definition is available.
Diffstat (limited to 'backends')
-rw-r--r-- | backends/cloud/cloudmanager.cpp | 5 | ||||
-rw-r--r-- | backends/fs/ds/ds-fs-factory.cpp | 3 | ||||
-rw-r--r-- | backends/fs/ps2/ps2-fs-factory.cpp | 4 | ||||
-rw-r--r-- | backends/fs/psp/psp-fs-factory.cpp | 4 | ||||
-rw-r--r-- | backends/fs/wii/wii-fs-factory.cpp | 4 | ||||
-rw-r--r-- | backends/graphics/opengl/shader.cpp | 4 | ||||
-rw-r--r-- | backends/networking/curl/connectionmanager.cpp | 6 | ||||
-rw-r--r-- | backends/networking/sdl_net/localwebserver.cpp | 3 | ||||
-rw-r--r-- | backends/platform/psp/display_manager.cpp | 4 | ||||
-rw-r--r-- | backends/platform/psp/powerman.cpp | 4 | ||||
-rw-r--r-- | backends/platform/psp/rtc.cpp | 3 | ||||
-rw-r--r-- | backends/plugins/elf/memory-manager.cpp | 4 | ||||
-rw-r--r-- | backends/plugins/elf/shorts-segment-manager.cpp | 4 |
13 files changed, 0 insertions, 52 deletions
diff --git a/backends/cloud/cloudmanager.cpp b/backends/cloud/cloudmanager.cpp index 5519e4baab..549926881d 100644 --- a/backends/cloud/cloudmanager.cpp +++ b/backends/cloud/cloudmanager.cpp @@ -32,11 +32,6 @@ #include "backends/networking/sdl_net/localwebserver.h" #endif -namespace Common { - -DECLARE_SINGLETON(Cloud::CloudManager); - -} namespace Cloud { diff --git a/backends/fs/ds/ds-fs-factory.cpp b/backends/fs/ds/ds-fs-factory.cpp index 98c522f1d6..e99033eebd 100644 --- a/backends/fs/ds/ds-fs-factory.cpp +++ b/backends/fs/ds/ds-fs-factory.cpp @@ -28,9 +28,6 @@ #include "backends/fs/ds/ds-fs.h" #include "dsmain.h" //for the isGBAMPAvailable() function -namespace Common { -DECLARE_SINGLETON(DSFilesystemFactory); -} AbstractFSNode *DSFilesystemFactory::makeRootFileNode() const { if (DS::isGBAMPAvailable()) { diff --git a/backends/fs/ps2/ps2-fs-factory.cpp b/backends/fs/ps2/ps2-fs-factory.cpp index 9c12d27a6e..93525eba1a 100644 --- a/backends/fs/ps2/ps2-fs-factory.cpp +++ b/backends/fs/ps2/ps2-fs-factory.cpp @@ -28,10 +28,6 @@ #include "backends/fs/ps2/ps2-fs-factory.h" #include "backends/fs/ps2/ps2-fs.h" -namespace Common { -DECLARE_SINGLETON(Ps2FilesystemFactory); -} - AbstractFSNode *Ps2FilesystemFactory::makeRootFileNode() const { return new Ps2FilesystemNode(); } diff --git a/backends/fs/psp/psp-fs-factory.cpp b/backends/fs/psp/psp-fs-factory.cpp index 303ea242c5..fa92bf42d1 100644 --- a/backends/fs/psp/psp-fs-factory.cpp +++ b/backends/fs/psp/psp-fs-factory.cpp @@ -44,10 +44,6 @@ #include <unistd.h> -namespace Common { -DECLARE_SINGLETON(PSPFilesystemFactory); -} - AbstractFSNode *PSPFilesystemFactory::makeRootFileNode() const { return new PSPFilesystemNode(); } diff --git a/backends/fs/wii/wii-fs-factory.cpp b/backends/fs/wii/wii-fs-factory.cpp index f234c1e300..1c95e4e42f 100644 --- a/backends/fs/wii/wii-fs-factory.cpp +++ b/backends/fs/wii/wii-fs-factory.cpp @@ -43,10 +43,6 @@ #include <smb.h> #endif -namespace Common { -DECLARE_SINGLETON(WiiFilesystemFactory); -} - WiiFilesystemFactory::WiiFilesystemFactory() : _dvdMounted(false), _smbMounted(false), diff --git a/backends/graphics/opengl/shader.cpp b/backends/graphics/opengl/shader.cpp index 0b4c677d70..b405f3d102 100644 --- a/backends/graphics/opengl/shader.cpp +++ b/backends/graphics/opengl/shader.cpp @@ -27,10 +27,6 @@ #include "common/textconsole.h" #include "common/util.h" -namespace Common { -DECLARE_SINGLETON(OpenGL::ShaderManager); -} - namespace OpenGL { namespace { diff --git a/backends/networking/curl/connectionmanager.cpp b/backends/networking/curl/connectionmanager.cpp index d8662ab78d..dee4ece742 100644 --- a/backends/networking/curl/connectionmanager.cpp +++ b/backends/networking/curl/connectionmanager.cpp @@ -29,12 +29,6 @@ #include "common/timer.h" #include <curl/curl.h> -namespace Common { - -DECLARE_SINGLETON(Networking::ConnectionManager); - -} - namespace Networking { ConnectionManager::ConnectionManager(): _multi(0), _timerStarted(false), _frame(0) { diff --git a/backends/networking/sdl_net/localwebserver.cpp b/backends/networking/sdl_net/localwebserver.cpp index 836b90a244..558bffec26 100644 --- a/backends/networking/sdl_net/localwebserver.cpp +++ b/backends/networking/sdl_net/localwebserver.cpp @@ -51,9 +51,6 @@ namespace Common { class MemoryReadWriteStream; - -DECLARE_SINGLETON(Networking::LocalWebserver); - } namespace Networking { diff --git a/backends/platform/psp/display_manager.cpp b/backends/platform/psp/display_manager.cpp index 2e995c809e..ffd37414be 100644 --- a/backends/platform/psp/display_manager.cpp +++ b/backends/platform/psp/display_manager.cpp @@ -62,10 +62,6 @@ const OSystem::GraphicsMode DisplayManager::_supportedModes[] = { // Class VramAllocator ----------------------------------- -namespace Common { -DECLARE_SINGLETON(VramAllocator); -} - //#define __PSP_DEBUG_FUNCS__ /* For debugging the stack */ //#define __PSP_DEBUG_PRINT__ diff --git a/backends/platform/psp/powerman.cpp b/backends/platform/psp/powerman.cpp index 3cd663e3c7..4b415ef50e 100644 --- a/backends/platform/psp/powerman.cpp +++ b/backends/platform/psp/powerman.cpp @@ -30,10 +30,6 @@ //#define __PSP_DEBUG_PRINT__ #include "backends/platform/psp/trace.h" -namespace Common { -DECLARE_SINGLETON(PowerManager); -} - // Function to debug the Power Manager (we have no output to screen) inline void PowerManager::debugPM() { PSP_DEBUG_PRINT("PM status[%d]. Listcount[%d]. CriticalCount[%d]. ThreadId[%x]. Error[%d]\n", diff --git a/backends/platform/psp/rtc.cpp b/backends/platform/psp/rtc.cpp index d01bd8f83a..67ad36c334 100644 --- a/backends/platform/psp/rtc.cpp +++ b/backends/platform/psp/rtc.cpp @@ -34,9 +34,6 @@ // Class PspRtc --------------------------------------------------------------- -namespace Common { -DECLARE_SINGLETON(PspRtc); -} void PspRtc::init() { // init our starting ticks uint32 ticks[2]; diff --git a/backends/plugins/elf/memory-manager.cpp b/backends/plugins/elf/memory-manager.cpp index 5014718ae8..7be79434bf 100644 --- a/backends/plugins/elf/memory-manager.cpp +++ b/backends/plugins/elf/memory-manager.cpp @@ -29,10 +29,6 @@ #include "common/util.h" #include <malloc.h> -namespace Common { -DECLARE_SINGLETON(ELFMemoryManager); -} - ELFMemoryManager::ELFMemoryManager() : _heap(0), _heapSize(0), _heapAlign(0), _trackAllocs(false), _measuredSize(0), _measuredAlign(0), diff --git a/backends/plugins/elf/shorts-segment-manager.cpp b/backends/plugins/elf/shorts-segment-manager.cpp index 4fa03cc79c..2af6c10e0f 100644 --- a/backends/plugins/elf/shorts-segment-manager.cpp +++ b/backends/plugins/elf/shorts-segment-manager.cpp @@ -33,10 +33,6 @@ extern char __plugin_hole_start; // Indicates start of hole in program file for extern char __plugin_hole_end; // Indicates end of hole in program file extern char _gp[]; // Value of gp register -namespace Common { -DECLARE_SINGLETON(ShortSegmentManager); // For singleton -} - ShortSegmentManager::ShortSegmentManager() { _shortsStart = &__plugin_hole_start ; //shorts segment begins at the plugin hole we made when linking _shortsEnd = &__plugin_hole_end; //and ends at the end of that hole. |