mirror of
https://github.com/SWG-Source/src.git
synced 2026-08-01 01:16:03 -04:00
try some more stuff
This commit is contained in:
+1
-1
@@ -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<GenericConnection *> m_serverConnections;
|
||||
|
||||
+2
-2
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -257,12 +257,13 @@ void CentralServerMetricsData::updateData()
|
||||
{
|
||||
for (std::map<int, std::pair<std::string, int> >::const_iterator iter = lastLoginTimeStatistics.begin(); iter != lastLoginTimeStatistics.end(); ++iter)
|
||||
{
|
||||
if (!iter->second.first.empty() && (m_mapLastLoginTimeStatisticsIndex.count(iter->second.first) < 1))
|
||||
std::pair<std::string, int> 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -85,7 +85,7 @@ GenericAPICore::GenericAPICore(const char *game, const char *hosts[],
|
||||
GenericAPICore::~GenericAPICore()
|
||||
//----------------------------------------
|
||||
{
|
||||
for (std::vector<GenericConnection *>::iterator conIter = m_serverConnections.begin(); conIter != m_serverConnections.end(); conIter++)
|
||||
for (std::vector<GenericConnection *>::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<GenericConnection *>::iterator conIter = m_serverConnections.begin(); conIter != m_serverConnections.end(); conIter++)
|
||||
for (std::vector<GenericConnection *>::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<GenericConnection *>::iterator conIter = m_serverConnections.begin(); conIter != m_serverConnections.end(); conIter++)
|
||||
for (std::vector<GenericConnection *>::iterator conIter = m_serverConnections.begin(); conIter != m_serverConnections.end(); ++conIter)
|
||||
{
|
||||
GenericConnection *con = *conIter;
|
||||
if (con->isConnected())
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user