mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-29 06:32:58 +00:00
# housekeeping
replaced all (*) CStr / CStrW by-value params with const reference. hoo boy. please always perform this optimization (actually standard idiom) when writing the code - it takes little work, tells the next guy that the string won't be modified, and makes a large performance difference. (* where possible.. a few require other changes and will follow later) This was SVN commit r4151.
This commit is contained in:
@@ -20,7 +20,7 @@ CNetClient *g_NetClient=NULL;
|
||||
extern "C" int fps;
|
||||
extern CConsole *g_Console;
|
||||
|
||||
CNetClient::CServerSession::CServerSession(int sessionID, const CStrW &name):
|
||||
CNetClient::CServerSession::CServerSession(int sessionID, const CStrW& name):
|
||||
m_SessionID(sessionID),
|
||||
m_Name(name)
|
||||
{
|
||||
@@ -387,7 +387,7 @@ bool CNetClient::ChatHandler(CNetMessage *pMsg, CNetSession *pSession)
|
||||
}
|
||||
}
|
||||
|
||||
void CNetClient::OnClientConnect(int sessionID, const CStrW &name)
|
||||
void CNetClient::OnClientConnect(int sessionID, const CStrW& name)
|
||||
{
|
||||
// Find existing server session, if any, and delete it
|
||||
SessionMap::iterator it=m_ServerSessions.find(sessionID);
|
||||
|
||||
Reference in New Issue
Block a user