From 05c1e593c03a2298c50f55b58ef48d70a9ce9b6d Mon Sep 17 00:00:00 2001 From: Lothar Serra Mari Date: Mon, 16 Apr 2018 22:56:08 +0200 Subject: COMMON: Add hasInstance() bool to singleton class --- common/singleton.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'common') 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, -- cgit v1.2.3