aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMax Horn2005-01-01 18:53:47 +0000
committerMax Horn2005-01-01 18:53:47 +0000
commitf52be9df681358564991e0988bf70160970104ad (patch)
treed7de4493e5f6e7c0b229014707a915d0b42d07e3 /common
parent03d4a6fa47e73ddbddc6bc096f6cef14ea7d7441 (diff)
downloadscummvm-rg350-f52be9df681358564991e0988bf70160970104ad.tar.gz
scummvm-rg350-f52be9df681358564991e0988bf70160970104ad.tar.bz2
scummvm-rg350-f52be9df681358564991e0988bf70160970104ad.zip
Changed OSystem::instance() to return a reference, not a pointer (it now matches the Singleton interface)
svn-id: r16402
Diffstat (limited to 'common')
-rw-r--r--common/system.cpp4
-rw-r--r--common/system.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/common/system.cpp b/common/system.cpp
index fbd9e0a7cd..9c465a14fb 100644
--- a/common/system.cpp
+++ b/common/system.cpp
@@ -58,10 +58,10 @@ static OSystem *createSystem() {
#endif
}
-OSystem *OSystem::instance() {
+OSystem &OSystem::instance() {
if (!s_system)
s_system = createSystem();
- return s_system;
+ return *s_system;
}
diff --git a/common/system.h b/common/system.h
index b1d33e34b8..2a3b0fafc1 100644
--- a/common/system.h
+++ b/common/system.h
@@ -47,7 +47,7 @@ public:
* not a real class (and thus it isn't based on our Singleton template).
* @return the pointer to the (singleton) OSystem instance
*/
- static OSystem *instance();
+ static OSystem &instance();
public:
@@ -687,7 +687,7 @@ public:
};
/** The global OSystem instance. Inited in main(). */
-#define g_system (OSystem::instance())
+#define g_system (&OSystem::instance())
namespace Common {