diff options
| author | Machiavelli <none@none> | 2010-06-25 00:18:01 +0200 |
|---|---|---|
| committer | Machiavelli <none@none> | 2010-06-25 00:18:01 +0200 |
| commit | 0f7657b68c8b6444fadb480cdd0f87631391afa5 (patch) | |
| tree | a5ffdaecbb1332ffbc655916842a23a622340c98 /src/server/game/Conditions | |
| parent | a6b9e716a61334e218cff227f66b0c51053e72f3 (diff) | |
Get rid of Trinity Singleton and Threading patterns and replace them with ACE_Singletons and ACE_GUARD_x macro´s with ACE_Thread_Mutex´es respectively.
Also get rid of unused CountedReference class that used Trinity threading pattern.
--HG--
branch : trunk
Diffstat (limited to 'src/server/game/Conditions')
| -rw-r--r-- | src/server/game/Conditions/ConditionMgr.cpp | 4 | ||||
| -rw-r--r-- | src/server/game/Conditions/ConditionMgr.h | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index cb35d35c63f..2e81aad1859 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -19,7 +19,7 @@ */ -#include "SingletonImp.h" + #include "Player.h" #include "SpellAuras.h" #include "SpellMgr.h" @@ -29,8 +29,6 @@ #include "InstanceData.h" #include "ConditionMgr.h" -INSTANTIATE_SINGLETON_1(ConditionMgr); - // Checks if player meets the condition // Can have CONDITION_SOURCE_TYPE_NONE && !mReferenceId if called from a special event (ie: eventAI) bool Condition::Meets(Player * player, Unit* targetOverride) diff --git a/src/server/game/Conditions/ConditionMgr.h b/src/server/game/Conditions/ConditionMgr.h index 2c7c44ecf7f..bb9fc2708fa 100644 --- a/src/server/game/Conditions/ConditionMgr.h +++ b/src/server/game/Conditions/ConditionMgr.h @@ -121,8 +121,10 @@ typedef std::map<uint32, ConditionList > ConditionReferenceMap;//only used for r class ConditionMgr { + friend class ACE_Singleton<ConditionMgr, ACE_Null_Mutex>; + ConditionMgr(); + public: - ConditionMgr(); ~ConditionMgr(); void LoadConditions(bool isReload = false); @@ -165,6 +167,6 @@ class ConditionMgr std::list<Condition*> m_AllocatedMemory; // some garbage collection :) }; -#define sConditionMgr Trinity::Singleton<ConditionMgr>::Instance() +#define sConditionMgr (*ACE_Singleton<ConditionMgr, ACE_Null_Mutex>::instance()) #endif |
