mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Light optimizations
This commit is contained in:
parent
872b39514f
commit
326b751934
@ -129,14 +129,14 @@ void ParseAndApplyConfigFile(const string& svConfig)
|
||||
{
|
||||
while (std::getline(ss, svInput, '\n'))
|
||||
{
|
||||
size_t nPos = svInput.find(" ");
|
||||
string::size_type nPos = svInput.find(' ');
|
||||
if (!svInput.empty()
|
||||
&& nPos > 0
|
||||
&& nPos < svInput.size()
|
||||
&& nPos != svInput.size())
|
||||
{
|
||||
string svValue = svInput.substr(nPos + 1);
|
||||
string svArgument = svInput.erase(svInput.find(" "));
|
||||
string svArgument = svInput.erase(svInput.find(' '));
|
||||
|
||||
CommandLine()->AppendParm(svArgument.c_str(), svValue.c_str());
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ void CNetCon::UserInput(void)
|
||||
this->Disconnect();
|
||||
return;
|
||||
}
|
||||
size_t nPos = svInput.find(" ");
|
||||
string::size_type nPos = svInput.find(' ');
|
||||
if (!svInput.empty()
|
||||
&& nPos > 0
|
||||
&& nPos < svInput.size()
|
||||
@ -147,14 +147,14 @@ void CNetCon::UserInput(void)
|
||||
}
|
||||
else // Setup connection from input.
|
||||
{
|
||||
size_t nPos = svInput.find(" ");
|
||||
string::size_type nPos = svInput.find(' ');
|
||||
if (!svInput.empty()
|
||||
&& nPos > 0
|
||||
&& nPos < svInput.size()
|
||||
&& nPos != svInput.size())
|
||||
{
|
||||
std::string svInPort = svInput.substr(nPos + 1);
|
||||
std::string svInAdr = svInput.erase(svInput.find(" "));
|
||||
std::string svInAdr = svInput.erase(svInput.find(' '));
|
||||
|
||||
if (!this->Connect(svInAdr, svInPort))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user