diff --git a/core/singleton.h b/core/singleton.h index 24b43669..90f0dd60 100644 --- a/core/singleton.h +++ b/core/singleton.h @@ -9,11 +9,11 @@ class singleton public: static T* instance() { - _inst_m.lock(); + inst_m.lock(); if(NULL == _instance) { _instance = new T(); } - _inst_m.unlock(); + inst_m.unlock(); return _instance; } @@ -21,31 +21,31 @@ public: static bool haveInstance() { bool res = false; - _inst_m.lock(); + inst_m.lock(); res = _instance != NULL; - _inst_m.unlock(); + inst_m.unlock(); return res; } static void dispose() { - _inst_m.lock(); + inst_m.lock(); if(_instance != NULL){ delete _instance; _instance = NULL; } - _inst_m.unlock(); + inst_m.unlock(); } private: static T* _instance; - static AmMutex _inst_m; + static AmMutex inst_m; }; template T* singleton::_instance = NULL; template -AmMutex singleton::_inst_m; +AmMutex singleton::inst_m; #endif