Removed references to tr1 now that c++11 works

This commit is contained in:
Anonymous
2014-01-23 09:28:13 -07:00
parent e6431a9fd4
commit 210bdb91d8
56 changed files with 198 additions and 205 deletions
@@ -18,15 +18,15 @@
#include "sharedLog/Log.h"
#include "sharedObject/World.h"
#include <tr1/unordered_map>
#include <unordered_map>
using namespace Scripting;
namespace AiMovementSwarmNamespace
{
typedef std::tr1::unordered_map<CachedNetworkId, std::vector<AiMovementSwarm::CreatureWatcher>, CachedNetworkId> targetMap;
typedef std::tr1::unordered_map<CachedNetworkId, Vector, CachedNetworkId> offsetMap;
typedef std::unordered_map<CachedNetworkId, std::vector<AiMovementSwarm::CreatureWatcher>, CachedNetworkId> targetMap;
typedef std::unordered_map<CachedNetworkId, Vector, CachedNetworkId> offsetMap;
// map of swarm targets to the creatures swarming them
targetMap s_swarmMap;
@@ -590,8 +590,8 @@ static time_t s_timeMarketConnectionCre
static std::map<int, std::pair<CachedNetworkId, int> > s_queries;
static std::map<NetworkId, QueuedQuery *> s_queryTime;
static int s_nextRequestId;
static std::tr1::unordered_map<NetworkId, ItemLoadPair, NetworkId::Hash> s_pendingLoads;
static std::tr1::unordered_map<int, int> s_pendingAdds; //sequence to cost map
static std::unordered_map<NetworkId, ItemLoadPair, NetworkId::Hash> s_pendingLoads;
static std::unordered_map<int, int> s_pendingAdds; //sequence to cost map
// all money transactions transfer money out of or to the bank of the player and never to or from the vendor/bazaar location except bazaar sale fees
static const std::string COMMODITIES_NAMED_ACCOUNT("commodities_named_escrow_account");
@@ -1321,7 +1321,7 @@ void CommoditiesMarket::onAddAuction(int sequence, int32 result, const NetworkId
}
}
}
std::tr1::unordered_map<int, int>::iterator f = s_pendingAdds.find(sequence);
std::unordered_map<int, int>::iterator f = s_pendingAdds.find(sequence);
int auctionFee = 0;
if (f != s_pendingAdds.end())
{
@@ -2488,7 +2488,7 @@ void CommoditiesMarket::checkPendingLoads(const NetworkId &itemId)
if (!ConfigServerGame::getCommoditiesMarketEnabled())
return;
LOG("AuctionRetrieval", ("CommoditiesMarket::response from DB for loading object %s for retrieval", itemId.getValueString().c_str()));
std::tr1::unordered_map<NetworkId, ItemLoadPair, NetworkId::Hash>::iterator f = s_pendingLoads.find(itemId);
std::unordered_map<NetworkId, ItemLoadPair, NetworkId::Hash>::iterator f = s_pendingLoads.find(itemId);
if (f != s_pendingLoads.end())
{
CreatureObject *player = dynamic_cast<CreatureObject *>(NetworkIdManager::getObjectById((*f).second.ownerId));
@@ -10,7 +10,7 @@
#include "sharedCommandParser/CommandParser.h"
#include <map>
#include <tr1/unordered_set>
#include <unordered_set>
#include "UnicodeUtils.h"
// ======================================================================
@@ -18,7 +18,7 @@ class ConsoleCommandParserDefault : public CommandParser
{
public:
typedef std::map<String_t, String_t> AliasMap_t;
typedef std::tr1::unordered_set<String_t> AliasGuardSet_t;
typedef std::unordered_set<String_t> AliasGuardSet_t;
explicit ConsoleCommandParserDefault (void);
@@ -33,7 +33,7 @@
#include "sharedObject/NetworkIdManager.h"
#include "sharedSkillSystem/SkillManager.h"
#include "sharedSkillSystem/SkillObject.h"
#include <tr1/unordered_map>
#include <unordered_map>
#include <limits>
#include <map>
#include <vector>
@@ -19,7 +19,7 @@
#include "sharedObject/CachedNetworkId.h"
#include "sharedObject/Object.h"
#include "unicodeArchive/UnicodeArchive.h"
#include <tr1/unordered_set>
#include <unordered_set>
#include <map>
class ConnectionServerConnection;
@@ -128,12 +128,12 @@ public:
return (reinterpret_cast<const size_t>(ptr) >> 4);
};
};
typedef std::tr1::unordered_set<ServerObject*, ServerObjectPointerHash> ObservingList;
typedef std::unordered_set<ServerObject*, ServerObjectPointerHash> ObservingList;
// objects being observed that are in this list needs
// to have their pvp status updated when there are changes
// that requires pvp status to be recalcuclated
typedef std::tr1::unordered_set<TangibleObject*, TangibleObjectPointerHash> ObservingListPvpSync;
typedef std::unordered_set<TangibleObject*, TangibleObjectPointerHash> ObservingListPvpSync;
ObservingList const & getObserving() const;
ObservingListPvpSync const & getObservingPvpSync() const;
@@ -25,14 +25,14 @@
#include "sharedObject/Container.h"
#include <queue>
#include <map>
#include <tr1/unordered_map>
#include <unordered_map>
// ======================================================================
static bool s_installed;
static Scheduler *s_logoutTrackerScheduler;
static std::queue<NetworkId> s_logoutCallbacks;
static std::tr1::unordered_map<NetworkId, int, NetworkId::Hash> s_logoutCallbacksCount;
static std::unordered_map<NetworkId, int, NetworkId::Hash> s_logoutCallbacksCount;
namespace LogoutTrackerNamespace
{
@@ -76,7 +76,7 @@ void LogoutTracker::add(NetworkId const &networkId)
// when they go off, and only when the last 3 minute timer goes off do we remove him from the
// world, which is the desired behavior of leaving a disconnected character in the world for
// 3 minutes before removing him from the world
std::tr1::unordered_map<NetworkId, int, NetworkId::Hash>::iterator iter = s_logoutCallbacksCount.find(networkId);
std::unordered_map<NetworkId, int, NetworkId::Hash>::iterator iter = s_logoutCallbacksCount.find(networkId);
if (iter == s_logoutCallbacksCount.end())
{
s_logoutCallbacksCount[networkId] = 1;
@@ -97,7 +97,7 @@ void LogoutTracker::handleLogoutCallback(const void *context)
UNREF(context);
NetworkId const &networkId = s_logoutCallbacks.front();
std::tr1::unordered_map<NetworkId, int, NetworkId::Hash>::iterator iter = s_logoutCallbacksCount.find(networkId);
std::unordered_map<NetworkId, int, NetworkId::Hash>::iterator iter = s_logoutCallbacksCount.find(networkId);
// only process the *LAST* logout callback that is put into the logout callback
// queue for this object as the previous ones are no longer applicable
@@ -23,7 +23,7 @@
#include "sharedFoundation/FormattedString.h"
#include "sharedNetworkMessages/ChatRoomData.h"
#include <tr1/unordered_map>
#include <unordered_map>
// ======================================================================
@@ -183,7 +183,7 @@
#include <algorithm>
#include <deque>
#include <limits>
#include <tr1/unordered_set>
#include <unordered_set>
#include <set>
//----------------------------------------------------------------------
@@ -8393,11 +8393,11 @@ void ServerObject::stopListeningToAllBroadcastMessages()
else
{
// build list of all broadcasters this object is currently listening to
std::tr1::unordered_set<NetworkId> broadcasters;
std::unordered_set<NetworkId> broadcasters;
for (BroadcastMap::const_iterator iter = m_broadcastBroadcasters.begin(); iter != m_broadcastBroadcasters.end(); ++iter)
IGNORE_RETURN(broadcasters.insert(iter->second));
for (std::tr1::unordered_set<NetworkId>::const_iterator iter2 = broadcasters.begin(); iter2 != broadcasters.end(); ++iter2)
for (std::unordered_set<NetworkId>::const_iterator iter2 = broadcasters.begin(); iter2 != broadcasters.end(); ++iter2)
{
// need to send a message to the broadcaster if the broadcaster is not on this game server
ServerObject * objBroadcaster = ServerWorld::findObjectByNetworkId(*iter2);
@@ -18,7 +18,7 @@
#include "sharedDebug/Profiler.h"
#include "sharedObject/NetworkIdManager.h"
#include <algorithm>
#include <tr1/unordered_map>
#include <unordered_map>
// ======================================================================
@@ -48,8 +48,8 @@ namespace TriggerVolumeNamespace
// optimization to track how many time a NetworkId appears
// in sources and targets, so that we can avoid unnecessarily
// searching the entire sources and targets vectors
std::tr1::unordered_map<NetworkId, int> m_sourcesCount;
std::tr1::unordered_map<NetworkId, int> m_targetsCount;
std::unordered_map<NetworkId, int> m_sourcesCount;
std::unordered_map<NetworkId, int> m_targetsCount;
};
// ----------------------------------------------------------------------
@@ -61,7 +61,7 @@ namespace TriggerVolumeNamespace
m_sources.push_back(source);
m_targets.push_back(target);
std::tr1::unordered_map<NetworkId, int>::iterator i = m_sourcesCount.find(source);
std::unordered_map<NetworkId, int>::iterator i = m_sourcesCount.find(source);
if (i == m_sourcesCount.end())
m_sourcesCount[source] = 1;
else
@@ -80,7 +80,7 @@ namespace TriggerVolumeNamespace
{
// remove all entries from sources
// and targets for the specified id
std::tr1::unordered_map<NetworkId, int>::iterator const iterCountSource = m_sourcesCount.find(id);
std::unordered_map<NetworkId, int>::iterator const iterCountSource = m_sourcesCount.find(id);
if (iterCountSource != m_sourcesCount.end())
{
int countSource = iterCountSource->second;
@@ -104,7 +104,7 @@ namespace TriggerVolumeNamespace
std::vector<NetworkId>::iterator targetsIter = m_targets.begin();
std::advance(targetsIter, index);
std::tr1::unordered_map<NetworkId, int>::iterator const iterCountTarget = m_targetsCount.find(*targetsIter);
std::unordered_map<NetworkId, int>::iterator const iterCountTarget = m_targetsCount.find(*targetsIter);
if (iterCountTarget != m_targetsCount.end())
{
if (iterCountTarget->second <= 1)
@@ -128,7 +128,7 @@ namespace TriggerVolumeNamespace
m_sourcesCount.erase(iterCountSource);
}
std::tr1::unordered_map<NetworkId, int>::iterator const iterCountTarget = m_targetsCount.find(id);
std::unordered_map<NetworkId, int>::iterator const iterCountTarget = m_targetsCount.find(id);
if (iterCountTarget != m_targetsCount.end())
{
int countTarget = iterCountTarget->second;
@@ -152,7 +152,7 @@ namespace TriggerVolumeNamespace
std::vector<NetworkId>::iterator sourcesIter = m_sources.begin();
std::advance(sourcesIter, index);
std::tr1::unordered_map<NetworkId, int>::iterator const iterCountSource = m_sourcesCount.find(*sourcesIter);
std::unordered_map<NetworkId, int>::iterator const iterCountSource = m_sourcesCount.find(*sourcesIter);
if (iterCountSource != m_sourcesCount.end())
{
if (iterCountSource->second <= 1)
@@ -14,7 +14,7 @@
#include "sharedFoundation/NetworkId.h"
#include "sharedUtility/PooledString.h"
#include <tr1/unordered_set>
#include <unordered_set>
// ======================================================================
@@ -40,7 +40,7 @@ public:
};
};
typedef std::tr1::unordered_set<ServerObject *, ServerObjectPointerHash> ContentsSet;
typedef std::unordered_set<ServerObject *, ServerObjectPointerHash> ContentsSet;
void addObject(ServerObject &object);
void addEventSource(NetworkId const &source);
@@ -21,7 +21,7 @@
//@END TFD TEMPLATE REFS
#include <stdio.h>
#include <tr1/unordered_map>
#include <unordered_map>
const std::string DefaultString("");
const StringId DefaultStringId("", 0);
@@ -30,7 +30,7 @@ const TriggerVolumeData DefaultTriggerVolumeData;
bool ServerObjectTemplate::ms_allowDefaultTemplateParams = true;
typedef std::tr1::unordered_map<ServerObjectTemplate::XpTypes, std::string, std::tr1::hash<int> > XP_MAP;
typedef std::unordered_map<ServerObjectTemplate::XpTypes, std::string, std::hash<int> > XP_MAP;
static XP_MAP * XpMap = NULL;
@@ -18,8 +18,8 @@
#include "sharedLog/Log.h"
#include "sharedNetworkMessages/UpdatePvpStatusMessage.h"
#include <tr1/unordered_map>
#include <tr1/unordered_set>
#include <unordered_map>
#include <unordered_set>
// ======================================================================
@@ -41,12 +41,12 @@ namespace PvpUpdateObserverNamespace
};
};
std::tr1::unordered_set<TangibleObject const *, TangibleObjectPointerHash> s_activeUpdaters;
std::unordered_set<TangibleObject const *, TangibleObjectPointerHash> s_activeUpdaters;
typedef std::tr1::unordered_map<Client const *, std::tr1::unordered_map<NetworkId, std::pair<uint32, uint32> >, ClientObjectPointerHash> PvpUpdateObserverCache;
typedef std::unordered_map<Client const *, std::unordered_map<NetworkId, std::pair<uint32, uint32> >, ClientObjectPointerHash> PvpUpdateObserverCache;
PvpUpdateObserverCache s_pvpUpdateObserverCache;
typedef std::tr1::unordered_map<Client const *, std::tr1::unordered_set<NetworkId>, ClientObjectPointerHash> PvpUpdateObserverRequestsThisFrame;
typedef std::unordered_map<Client const *, std::unordered_set<NetworkId>, ClientObjectPointerHash> PvpUpdateObserverRequestsThisFrame;
PvpUpdateObserverRequestsThisFrame s_pvpUpdateObserverRequestsThisFrame;
// PvpUpdateObserver can be called multiple times per frame for the same object,
@@ -57,10 +57,10 @@ namespace PvpUpdateObserverNamespace
// so as an optimization, we'll only iterate over these 2 lists once per frame,
// and then just watch on individual updates to these 2 lists afterwards, and
// process the individual updates to these 2 lists when the updates occur
std::tr1::unordered_set<NetworkId> s_objectsProcessedThisFrame;
std::tr1::unordered_set<Client const *, ClientObjectPointerHash> s_clientsProcessedThisFrame;
std::unordered_set<NetworkId> s_objectsProcessedThisFrame;
std::unordered_set<Client const *, ClientObjectPointerHash> s_clientsProcessedThisFrame;
void sendUpdatePvpStatusMessage(Client const & client, std::tr1::unordered_set<NetworkId> const & requestedNetworkId, std::tr1::unordered_map<NetworkId, std::pair<uint32, uint32> > & cachedNetworkId);
void sendUpdatePvpStatusMessage(Client const & client, std::unordered_set<NetworkId> const & requestedNetworkId, std::unordered_map<NetworkId, std::pair<uint32, uint32> > & cachedNetworkId);
}
using namespace PvpUpdateObserverNamespace;
@@ -86,7 +86,7 @@ PvpUpdateObserver::PvpUpdateObserver(TangibleObject const *who, Archive::AutoDel
std::set<Client *> const &clients = who->getObservers();
for (std::set<Client *>::const_iterator i = clients.begin(); i != clients.end(); ++i)
{
std::tr1::unordered_map<NetworkId, std::pair<uint32, uint32> > & pvpUpdateObserverCache = s_pvpUpdateObserverCache[*i];
std::unordered_map<NetworkId, std::pair<uint32, uint32> > & pvpUpdateObserverCache = s_pvpUpdateObserverCache[*i];
if (pvpUpdateObserverCache.count(who->getNetworkId()) == 0)
{
uint32 flags, factionId;
@@ -104,8 +104,8 @@ PvpUpdateObserver::PvpUpdateObserver(TangibleObject const *who, Archive::AutoDel
Client * const client = who->getClient();
if (client && (s_clientsProcessedThisFrame.count(client) == 0))
{
std::tr1::unordered_map<NetworkId, std::pair<uint32, uint32> > & pvpUpdateObserverCache = s_pvpUpdateObserverCache[client];
std::tr1::unordered_set<NetworkId> & pvpUpdateObserverRequestsThisFrame = s_pvpUpdateObserverRequestsThisFrame[client];
std::unordered_map<NetworkId, std::pair<uint32, uint32> > & pvpUpdateObserverCache = s_pvpUpdateObserverCache[client];
std::unordered_set<NetworkId> & pvpUpdateObserverRequestsThisFrame = s_pvpUpdateObserverRequestsThisFrame[client];
Client::ObservingListPvpSync const &objs = client->getObservingPvpSync();
for (Client::ObservingListPvpSync::const_iterator i = objs.begin(); i != objs.end(); ++i)
@@ -218,7 +218,7 @@ void PvpUpdateObserver::startObservingPvpSyncNotification(Client const *client,
if ((s_objectsProcessedThisFrame.count(who.getNetworkId()) != 0) || (s_clientsProcessedThisFrame.count(client) != 0))
{
std::tr1::unordered_map<NetworkId, std::pair<uint32, uint32> > & pvpUpdateObserverCache = s_pvpUpdateObserverCache[client];
std::unordered_map<NetworkId, std::pair<uint32, uint32> > & pvpUpdateObserverCache = s_pvpUpdateObserverCache[client];
if (pvpUpdateObserverCache.count(who.getNetworkId()) == 0)
{
uint32 flags, factionId;
@@ -274,14 +274,14 @@ void PvpUpdateObserver::update()
// ----------------------------------------------------------------------
void PvpUpdateObserverNamespace::sendUpdatePvpStatusMessage(Client const & client, std::tr1::unordered_set<NetworkId> const & requestedNetworkId, std::tr1::unordered_map<NetworkId, std::pair<uint32, uint32> > & cachedNetworkId)
void PvpUpdateObserverNamespace::sendUpdatePvpStatusMessage(Client const & client, std::unordered_set<NetworkId> const & requestedNetworkId, std::unordered_map<NetworkId, std::pair<uint32, uint32> > & cachedNetworkId)
{
uint32 flags, factionId;
ServerObject const * serverObject;
TangibleObject const * tangibleObject;
std::tr1::unordered_map<NetworkId, std::pair<uint32, uint32> >::iterator iterCacheNetworkId;
std::unordered_map<NetworkId, std::pair<uint32, uint32> >::iterator iterCacheNetworkId;
for (std::tr1::unordered_set<NetworkId>::const_iterator iterRequestedNetworkId = requestedNetworkId.begin(); iterRequestedNetworkId != requestedNetworkId.end(); ++iterRequestedNetworkId)
for (std::unordered_set<NetworkId>::const_iterator iterRequestedNetworkId = requestedNetworkId.begin(); iterRequestedNetworkId != requestedNetworkId.end(); ++iterRequestedNetworkId)
{
iterCacheNetworkId = cachedNetworkId.find(*iterRequestedNetworkId);
if (iterCacheNetworkId == cachedNetworkId.end())
@@ -16,7 +16,7 @@
#include "sharedObject/NetworkIdManager.h"
#include <algorithm>
#include <tr1/unordered_map>
#include <unordered_map>
// ======================================================================
@@ -37,7 +37,7 @@ namespace SpaceVisibilityManager_namespace
typedef std::set<Client*> ClientSet;
typedef std::set<TrackedObject*> ObjectSet;
typedef std::map<Client*, TrackedObject*> ClientToObjectMapType;
typedef std::tr1::unordered_map<NetworkId, TrackedObject*> TrackedObjectsType;
typedef std::unordered_map<NetworkId, TrackedObject*> TrackedObjectsType;
// Classes