Replaced all remaining ACE based Singletons
Replaced ACE base AutoPtr class with shared_ptr Note: worldserver currently broken due to MapUpdater threading failure (ACE ofc, what else could it be)
This commit is contained in:
1 parent
d39a013b6b
commit
029bad6698
61 files changed
+347
-243
No files matched your search
@@ -20,7 +20,6 @@
|
||||
#define SC_SCRIPTMGR_H
|
||||
|
||||
#include "Common.h"
|
||||
#include <ace/Singleton.h>
|
||||
#include <ace/Atomic_Op.h>
|
||||
|
||||
#include "DBCStores.h"
|
||||
@@ -869,20 +868,23 @@ class GroupScript : public ScriptObject
|
||||
};
|
||||
|
||||
// Placed here due to ScriptRegistry::AddScript dependency.
|
||||
#define sScriptMgr ACE_Singleton<ScriptMgr, ACE_Null_Mutex>::instance()
|
||||
#define sScriptMgr ScriptMgr::instance()
|
||||
|
||||
// Manages registration, loading, and execution of scripts.
|
||||
class ScriptMgr
|
||||
{
|
||||
friend class ACE_Singleton<ScriptMgr, ACE_Null_Mutex>;
|
||||
friend class ScriptObject;
|
||||
|
||||
private:
|
||||
|
||||
ScriptMgr();
|
||||
virtual ~ScriptMgr();
|
||||
|
||||
public: /* Initialization */
|
||||
static ScriptMgr* instance()
|
||||
{
|
||||
static ScriptMgr* instance = new ScriptMgr();
|
||||
return instance;
|
||||
}
|
||||
|
||||
void Initialize();
|
||||
void LoadDatabase();
|
||||
|
||||
Reference in new issue
Block a user