Split NetFileTransfer message parsing into one function per case, refs #5212.

Avoid redundant map lookups by caching the iterator.
Remove c-style casts by using type specific printf parameters, and
static_cast elsewhere.
Use references while at it, and typedef -> using.

Differential Revision: https://code.wildfiregames.com/D1567
Comments by: Vladislav
Tested on: clang 8.0.1, gcc 9.1.0

This was SVN commit r22916.
This commit is contained in:
elexis
2019-09-17 14:18:46 +00:00
parent 7dcaf478d8
commit d468535df3
4 changed files with 119 additions and 100 deletions
+1 -1
View File
@@ -391,7 +391,7 @@ bool CNetClient::HandleMessage(CNetMessage* message)
{
// Handle non-FSM messages first
Status status = m_Session->GetFileTransferer().HandleMessageReceive(message);
Status status = m_Session->GetFileTransferer().HandleMessageReceive(*message);
if (status == INFO::OK)
return true;
if (status != INFO::SKIPPED)