summaryrefslogtreecommitdiffstats
path: root/src/Server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Server.cpp')
-rw-r--r--src/Server.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Server.cpp b/src/Server.cpp
index 8be63c083..08142b008 100644
--- a/src/Server.cpp
+++ b/src/Server.cpp
@@ -709,7 +709,7 @@ void cServer::KickUser(int a_ClientID, const AString & a_Reason)
-void cServer::AuthenticateUser(int a_ClientID, const AString & a_Name, const cUUID & a_UUID, const Json::Value & a_Properties)
+void cServer::AuthenticateUser(int a_ClientID, AString && a_Username, const cUUID & a_UUID, Json::Value && a_Properties)
{
cCSLock Lock(m_CSClients);
@@ -720,14 +720,14 @@ void cServer::AuthenticateUser(int a_ClientID, const AString & a_Name, const cUU
return;
}
- for (auto itr = m_Clients.begin(); itr != m_Clients.end(); ++itr)
+ for (const auto & Client : m_Clients)
{
- if ((*itr)->GetUniqueID() == a_ClientID)
+ if (Client->GetUniqueID() == a_ClientID)
{
- (*itr)->Authenticate(a_Name, a_UUID, a_Properties);
+ Client->Authenticate(std::move(a_Username), a_UUID, std::move(a_Properties));
return;
}
- } // for itr - m_Clients[]
+ }
}