Remove 'using namespaces std' fixes #61

This commit is contained in:
Michael Cook
2013-05-22 16:17:19 -04:00
parent 312100e1c6
commit 0fdfe025cb
190 changed files with 1801 additions and 2004 deletions
+4 -10
View File
@@ -29,13 +29,11 @@
#include "wguild_mgr.h"
#include <set>
using namespace std;
extern ConsoleList console_list;
extern ZSList zoneserver_list;
uint32 numplayers = 0; //this really wants to be a member variable of ClientList...
ClientList::ClientList()
: CLStale_timer(45000)
{
@@ -45,13 +43,11 @@ ClientList::ClientList()
ClientList::~ClientList() {
}
void ClientList::Process() {
if (CLStale_timer.Check())
CLCheckStale();
LinkedListIterator<Client*> iterator(list);
iterator.Reset();
@@ -69,7 +65,6 @@ void ClientList::Process() {
}
}
void ClientList::CLERemoveZSRef(ZoneServer* iZS) {
LinkedListIterator<ClientListEntry*> iterator(clientlist);
@@ -86,7 +81,6 @@ void ClientList::CLERemoveZSRef(ZoneServer* iZS) {
ClientListEntry* ClientList::GetCLE(uint32 iID) {
LinkedListIterator<ClientListEntry*> iterator(clientlist);
iterator.Reset();
while(iterator.MoreElements()) {
if (iterator.GetData()->GetID() == iID) {
@@ -760,7 +754,7 @@ void ClientList::SendWhoAll(uint32 fromid,const char* to, int16 admin, Who_All_S
void ClientList::SendFriendsWho(ServerFriendsWho_Struct *FriendsWho, WorldTCPConnection* connection) {
vector<ClientListEntry*> FriendsCLEs;
std::vector<ClientListEntry*> FriendsCLEs;
FriendsCLEs.reserve(100);
char Friend_[65];
@@ -1235,7 +1229,7 @@ bool ClientList::SendPacket(const char* to, ServerPacket* pack) {
}
void ClientList::SendGuildPacket(uint32 guild_id, ServerPacket* pack) {
set<uint32> zone_ids;
std::set<uint32> zone_ids;
LinkedListIterator<ClientListEntry*> iterator(clientlist);
@@ -1249,7 +1243,7 @@ void ClientList::SendGuildPacket(uint32 guild_id, ServerPacket* pack) {
//now we know all the zones, send it to each one... this is kinda a shitty way to do this
//since its basically O(n^2)
set<uint32>::iterator cur, end;
std::set<uint32>::iterator cur, end;
cur = zone_ids.begin();
end = zone_ids.end();
for(; cur != end; cur++) {
@@ -1276,7 +1270,7 @@ int ClientList::GetClientCount() {
return(numplayers);
}
void ClientList::GetClients(const char *zone_name, vector<ClientListEntry *> &res) {
void ClientList::GetClients(const char *zone_name, std::vector<ClientListEntry *> &res) {
LinkedListIterator<ClientListEntry *> iterator(clientlist);
iterator.Reset();