aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorLothar Serra Mari2018-04-16 22:56:08 +0200
committerThierry Crozat2018-04-29 21:47:10 +0100
commit05c1e593c03a2298c50f55b58ef48d70a9ce9b6d (patch)
tree949a27d77f40a4ee5a318de6780e5e4501b68c35 /common
parent6ab6d767928b6fdc27bc4b484c2831d029d3c049 (diff)
downloadscummvm-rg350-05c1e593c03a2298c50f55b58ef48d70a9ce9b6d.tar.gz
scummvm-rg350-05c1e593c03a2298c50f55b58ef48d70a9ce9b6d.tar.bz2
scummvm-rg350-05c1e593c03a2298c50f55b58ef48d70a9ce9b6d.zip
COMMON: Add hasInstance() bool to singleton class
Diffstat (limited to 'common')
-rw-r--r--common/singleton.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/singleton.h b/common/singleton.h
index 9bcd590183..7deb1dd7dc 100644
--- a/common/singleton.h
+++ b/common/singleton.h
@@ -59,6 +59,10 @@ public:
public:
+ static bool hasInstance() {
+ return _singleton != 0;
+ }
+
static T& instance() {
// TODO: We aren't thread safe. For now we ignore it since the
// only thing using this singleton template is the config manager,