mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-03 09:26:36 +00:00
[Performance] Change to use Pass by reference where valid. (#3163)
* [Performance] Change to use Pass by reference where valid. * typo
This commit is contained in:
+1
-1
@@ -82,7 +82,7 @@ void Adventure::RemovePlayer(std::string character_name)
|
||||
}
|
||||
}
|
||||
|
||||
bool Adventure::PlayerExists(std::string character_name)
|
||||
bool Adventure::PlayerExists(const std::string& character_name)
|
||||
{
|
||||
auto iter = players.begin();
|
||||
while(iter != players.end())
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@ public:
|
||||
bool IsActive();
|
||||
void AddPlayer(std::string character_name, bool add_client_to_instance = true);
|
||||
void RemovePlayer(std::string character_name);
|
||||
bool PlayerExists(std::string character_name);
|
||||
bool PlayerExists(const std::string& character_name);
|
||||
bool CreateInstance();
|
||||
void IncrementCount();
|
||||
void IncrementAssassinationCount();
|
||||
|
||||
@@ -106,7 +106,7 @@ void LauncherLink::ProcessMessage(uint16 opcode, EQ::Net::Packet &p)
|
||||
cur = result.begin();
|
||||
end = result.end();
|
||||
ZoneState zs;
|
||||
for (; cur != end; cur++) {
|
||||
for (; cur != end; ++cur) {
|
||||
zs.port = cur->port;
|
||||
zs.up = false;
|
||||
zs.starts = 0;
|
||||
@@ -232,7 +232,7 @@ void LauncherLink::BootDynamics(uint8 new_count) {
|
||||
std::map<std::string, ZoneState>::iterator cur, end;
|
||||
cur = m_states.begin();
|
||||
end = m_states.end();
|
||||
for (; cur != end; cur++) {
|
||||
for (; cur != end; ++cur) {
|
||||
StopZone(cur->first.c_str());
|
||||
}
|
||||
}
|
||||
@@ -244,7 +244,7 @@ void LauncherLink::BootDynamics(uint8 new_count) {
|
||||
std::map<std::string, ZoneState>::iterator cur, end;
|
||||
cur = m_states.begin();
|
||||
end = m_states.end();
|
||||
for (; cur != end; cur++) {
|
||||
for (; cur != end; ++cur) {
|
||||
if (cur->first.find("dynamic_") == 0) {
|
||||
if (found >= new_count) {
|
||||
//this zone exceeds the number of allowed booted zones.
|
||||
@@ -266,7 +266,7 @@ void LauncherLink::GetZoneList(std::vector<std::string> &l) {
|
||||
std::map<std::string, ZoneState>::iterator cur, end;
|
||||
cur = m_states.begin();
|
||||
end = m_states.end();
|
||||
for (; cur != end; cur++) {
|
||||
for (; cur != end; ++cur) {
|
||||
l.push_back(cur->first.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,8 +59,8 @@ public:
|
||||
static void LockWorld() { if (_world_config) _world_config->Locked=true; }
|
||||
static void UnlockWorld() { if (_world_config) _world_config->Locked=false; }
|
||||
|
||||
static void SetWorldAddress(std::string addr) { if (_world_config) _world_config->WorldAddress=addr; }
|
||||
static void SetLocalAddress(std::string addr) { if (_world_config) _world_config->LocalAddress=addr; }
|
||||
static void SetWorldAddress(const std::string& addr) { if (_world_config) _world_config->WorldAddress=addr; }
|
||||
static void SetLocalAddress(const std::string& addr) { if (_world_config) _world_config->LocalAddress=addr; }
|
||||
|
||||
void Dump() const;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user