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
This commit is contained in:
Machiavelli
2010-06-25 00:18:01 +02:00
parent a6b9e716a6
commit 0f7657b68c
109 changed files with 349 additions and 1221 deletions
@@ -22,7 +22,7 @@
#include "World.h"
#include "WorldPacket.h"
#include "DatabaseEnv.h"
#include "SingletonImp.h"
#include "AchievementMgr.h"
#include "ArenaTeam.h"
@@ -41,8 +41,6 @@
#include "Map.h"
#include "InstanceData.h"
INSTANTIATE_SINGLETON_1(AchievementGlobalMgr);
namespace Trinity
{
class AchievementChatBuilder
@@ -965,7 +963,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
if (!miscvalue1)
continue;
Map const* map = GetPlayer()->IsInWorld() ? GetPlayer()->GetMap() : MapManager::Instance().FindMap(GetPlayer()->GetMapId(), GetPlayer()->GetInstanceId());
Map const* map = GetPlayer()->IsInWorld() ? GetPlayer()->GetMap() : sMapMgr.FindMap(GetPlayer()->GetMapId(), GetPlayer()->GetInstanceId());
if (!map || !map->IsDungeon())
continue;
@@ -22,7 +22,7 @@
#include <string>
#include "Common.h"
#include "Singleton.h"
#include "ace/Singleton.h"
#include "DatabaseEnv.h"
#include "DBCEnums.h"
#include "DBCStores.h"
@@ -342,6 +342,6 @@ class AchievementGlobalMgr
AchievementRewardLocales m_achievementRewardLocales;
};
#define achievementmgr Trinity::Singleton<AchievementGlobalMgr>::Instance()
#define achievementmgr (*ACE_Singleton<AchievementGlobalMgr, ACE_Null_Mutex>::instance())
#endif