diff options
author | Max Horn | 2010-11-16 08:23:13 +0000 |
---|---|---|
committer | Max Horn | 2010-11-16 08:23:13 +0000 |
commit | abe1959d36816b6c0703c1c3802764818585d0b6 (patch) | |
tree | 01fd7fe8a0f5bbad700d052c78f954862a11dc5f /common | |
parent | 5af8a76b489c315f4389f888489030bdcff52ae3 (diff) | |
download | scummvm-rg350-abe1959d36816b6c0703c1c3802764818585d0b6.tar.gz scummvm-rg350-abe1959d36816b6c0703c1c3802764818585d0b6.tar.bz2 scummvm-rg350-abe1959d36816b6c0703c1c3802764818585d0b6.zip |
COMMON: Simplify DECLARE_SINGLETON macro
This makes it possible to write
DECLARE_SINGLETON(foo);
instead of
DECLARE_SINGLETON(foo)
without causing a warning about an extra semicolon.
The extra semicolon helps some editors at parsing the C++ code.
svn-id: r54258
Diffstat (limited to 'common')
-rw-r--r-- | common/EventRecorder.cpp | 2 | ||||
-rw-r--r-- | common/archive.cpp | 2 | ||||
-rw-r--r-- | common/config-manager.cpp | 2 | ||||
-rw-r--r-- | common/debug.cpp | 2 | ||||
-rw-r--r-- | common/singleton.h | 4 | ||||
-rw-r--r-- | common/translation.cpp | 2 |
6 files changed, 6 insertions, 8 deletions
diff --git a/common/EventRecorder.cpp b/common/EventRecorder.cpp index 8d9856e45a..2ce57b8502 100644 --- a/common/EventRecorder.cpp +++ b/common/EventRecorder.cpp @@ -28,7 +28,7 @@ #include "common/config-manager.h" #include "common/random.h" -DECLARE_SINGLETON(Common::EventRecorder) +DECLARE_SINGLETON(Common::EventRecorder); namespace Common { diff --git a/common/archive.cpp b/common/archive.cpp index fe62355b8a..c65408b56e 100644 --- a/common/archive.cpp +++ b/common/archive.cpp @@ -290,5 +290,5 @@ void SearchManager::clear() { } // namespace Common -DECLARE_SINGLETON(Common::SearchManager) +DECLARE_SINGLETON(Common::SearchManager); diff --git a/common/config-manager.cpp b/common/config-manager.cpp index 67cb74d9eb..0141b22483 100644 --- a/common/config-manager.cpp +++ b/common/config-manager.cpp @@ -29,7 +29,7 @@ #include "common/util.h" #include "common/system.h" -DECLARE_SINGLETON(Common::ConfigManager) +DECLARE_SINGLETON(Common::ConfigManager); static bool isValidDomainName(const Common::String &domName) { const char *p = domName.c_str(); diff --git a/common/debug.cpp b/common/debug.cpp index 46f8e8b829..890648d4ec 100644 --- a/common/debug.cpp +++ b/common/debug.cpp @@ -51,7 +51,7 @@ // TODO: Move gDebugLevel into namespace Common. int gDebugLevel = -1; -DECLARE_SINGLETON(Common::DebugManager) +DECLARE_SINGLETON(Common::DebugManager); namespace Common { diff --git a/common/singleton.h b/common/singleton.h index 4ef871b173..33e943f162 100644 --- a/common/singleton.h +++ b/common/singleton.h @@ -101,9 +101,7 @@ protected: * namespace Common is referenced. */ #define DECLARE_SINGLETON(T) \ - namespace Common { \ - template<> T *Singleton<T>::_singleton = 0; \ - } // End of namespace Common + template<> T *Common::Singleton<T>::_singleton = 0 } // End of namespace Common diff --git a/common/translation.cpp b/common/translation.cpp index 70dac7a318..08b0431865 100644 --- a/common/translation.cpp +++ b/common/translation.cpp @@ -35,7 +35,7 @@ #include "common/archive.h" #include "common/config-manager.h" -DECLARE_SINGLETON(Common::TranslationManager) +DECLARE_SINGLETON(Common::TranslationManager); #ifdef USE_DETECTLANG #ifndef WIN32 |