diff --git a/engine/server/application/CentralServer/src/shared/AuctionTransferGameAPI/ATGenericAPI/GenericApiCore.h b/engine/server/application/CentralServer/src/shared/AuctionTransferGameAPI/ATGenericAPI/GenericApiCore.h index c2253ab4..91df0ff7 100644 --- a/engine/server/application/CentralServer/src/shared/AuctionTransferGameAPI/ATGenericAPI/GenericApiCore.h +++ b/engine/server/application/CentralServer/src/shared/AuctionTransferGameAPI/ATGenericAPI/GenericApiCore.h @@ -95,7 +95,7 @@ public: unsigned submitRequest(GenericRequest *req, GenericResponse *res); GenericConnection *getNextActiveConnection(); std::string &getGameCode() { return m_game; } - void addIdentifier(std::string id) { m_gameIdentifiers.push_back(id);} + void addIdentifier(const std::string &id) { m_gameIdentifiers.push_back(id);} protected: std::vector m_serverConnections; diff --git a/engine/server/application/CentralServer/src/shared/AuctionTransferGameAPI/Character.h b/engine/server/application/CentralServer/src/shared/AuctionTransferGameAPI/Character.h index 61409ac0..284e6c05 100644 --- a/engine/server/application/CentralServer/src/shared/AuctionTransferGameAPI/Character.h +++ b/engine/server/application/CentralServer/src/shared/AuctionTransferGameAPI/Character.h @@ -36,9 +36,9 @@ public: unsigned getID() const { return m_id; } std::string getData() const { return m_XMLdata; } - void setName(const std::string name) { m_name = name; } + void setName(const std::string &name) { m_name = name; } void setID(unsigned id) { m_id = id; } - void setData(const std::string data) { m_XMLdata = data; } + void setData(const std::string &data) { m_XMLdata = data; } protected: std::string m_name; diff --git a/engine/server/application/CentralServer/src/shared/CentralCSHandler.cpp b/engine/server/application/CentralServer/src/shared/CentralCSHandler.cpp index 8736f4c3..4746564a 100644 --- a/engine/server/application/CentralServer/src/shared/CentralCSHandler.cpp +++ b/engine/server/application/CentralServer/src/shared/CentralCSHandler.cpp @@ -320,13 +320,13 @@ CentralCSHandler::~CentralCSHandler() CS_CMD( login_character ) { - unsigned pos = request.getCommandString().find(" "); + const unsigned &pos = request.getCommandString().find(" "); std::string id; std::string account; if(pos == std::string::npos) return; - unsigned pos2 = request.getCommandString().find(" ", pos + 1 ); + const unsigned &pos2 = request.getCommandString().find(" ", pos + 1 ); id = request.getCommandString().substr(pos, pos2 - pos); account = request.getCommandString().substr(pos2 + 1); diff --git a/engine/server/application/CentralServer/src/shared/CentralServerMetricsData.cpp b/engine/server/application/CentralServer/src/shared/CentralServerMetricsData.cpp index 283273bd..19307914 100644 --- a/engine/server/application/CentralServer/src/shared/CentralServerMetricsData.cpp +++ b/engine/server/application/CentralServer/src/shared/CentralServerMetricsData.cpp @@ -257,12 +257,13 @@ void CentralServerMetricsData::updateData() { for (std::map >::const_iterator iter = lastLoginTimeStatistics.begin(); iter != lastLoginTimeStatistics.end(); ++iter) { - if (!iter->second.first.empty() && (m_mapLastLoginTimeStatisticsIndex.count(iter->second.first) < 1)) + std::pair secondIter = iter->second; + if (!secondIter.first.empty() && (m_mapLastLoginTimeStatisticsIndex.count(secondIter.first) < 1)) { std::string label("population."); - label += iter->second.first; + label += secondIter.first; - m_mapLastLoginTimeStatisticsIndex[iter->second.first] = addMetric(label.c_str(), 0, NULL, false, false); + m_mapLastLoginTimeStatisticsIndex[secondIter.first] = addMetric(label.c_str(), 0, NULL, false, false); } } } diff --git a/external/3rd/library/soePlatform/CTServiceGameAPI/CTGenericAPI/GenericApiCore.cpp b/external/3rd/library/soePlatform/CTServiceGameAPI/CTGenericAPI/GenericApiCore.cpp index 1756235a..2f68dd50 100644 --- a/external/3rd/library/soePlatform/CTServiceGameAPI/CTGenericAPI/GenericApiCore.cpp +++ b/external/3rd/library/soePlatform/CTServiceGameAPI/CTGenericAPI/GenericApiCore.cpp @@ -85,7 +85,7 @@ GenericAPICore::GenericAPICore(const char *game, const char *hosts[], GenericAPICore::~GenericAPICore() //---------------------------------------- { - for (std::vector::iterator conIter = m_serverConnections.begin(); conIter != m_serverConnections.end(); conIter++) + for (std::vector::iterator conIter = m_serverConnections.begin(); conIter != m_serverConnections.end(); ++conIter) { GenericConnection *con = *conIter; delete con; @@ -198,7 +198,7 @@ void GenericAPICore::process() } } - for (std::vector::iterator conIter = m_serverConnections.begin(); conIter != m_serverConnections.end(); conIter++) + for (std::vector::iterator conIter = m_serverConnections.begin(); conIter != m_serverConnections.end(); ++conIter) { GenericConnection *con = *conIter; con->process(); @@ -245,7 +245,7 @@ void GenericAPICore::countOpenConnections() m_currentConnections = 0; m_maxConnections = m_serverConnections.size(); - for (std::vector::iterator conIter = m_serverConnections.begin(); conIter != m_serverConnections.end(); conIter++) + for (std::vector::iterator conIter = m_serverConnections.begin(); conIter != m_serverConnections.end(); ++conIter) { GenericConnection *con = *conIter; if (con->isConnected()) diff --git a/external/3rd/library/soePlatform/CTServiceGameAPI/Unicode/UnicodeUtils.h b/external/3rd/library/soePlatform/CTServiceGameAPI/Unicode/UnicodeUtils.h index ab466482..0a65f8fc 100644 --- a/external/3rd/library/soePlatform/CTServiceGameAPI/Unicode/UnicodeUtils.h +++ b/external/3rd/library/soePlatform/CTServiceGameAPI/Unicode/UnicodeUtils.h @@ -196,7 +196,7 @@ namespace Plat_Unicode unsigned index = 0; s.resize(nstr.size()); const NarrowString::const_iterator end = nstr.end(); - for (NarrowString::const_iterator iter = nstr.begin(); iter != end; iter++) + for (NarrowString::const_iterator iter = nstr.begin(); iter != end; ++iter) { s[index++] = *iter; } @@ -214,7 +214,7 @@ namespace Plat_Unicode unsigned index = 0; str.resize(nstr.size()); const NarrowString::const_iterator end = nstr.end(); - for (NarrowString::const_iterator iter = nstr.begin(); iter != end; iter++) + for (NarrowString::const_iterator iter = nstr.begin(); iter != end; ++iter) { str[index++] = *iter; } @@ -237,7 +237,7 @@ namespace Plat_Unicode unsigned index = 0; s.resize(str.size()); const String::const_iterator end = str.end(); - for (String::const_iterator iter = str.begin(); iter != end; iter++) + for (String::const_iterator iter = str.begin(); iter != end; ++iter) { s[index++] = (char)*iter; } @@ -259,7 +259,7 @@ namespace Plat_Unicode unsigned index = 0; nstr.resize(str.size()); const String::const_iterator end = str.end(); - for (String::const_iterator iter = str.begin(); iter != end; iter++) + for (String::const_iterator iter = str.begin(); iter != end; ++iter) { nstr[index++] = (char)*iter; }