1
0
forked from 0ad/0ad

Fix two Clang warnings.

This was SVN commit r24512.
This commit is contained in:
Stan 2021-01-05 11:49:24 +00:00
parent f34fb5614c
commit 0221e70e51
2 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2020 Wildfire Games.
/* Copyright (C) 2021 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -850,7 +850,7 @@ void CNetServerWorker::AssignPlayer(int playerID, const CStr& guid)
void CNetServerWorker::ConstructPlayerAssignmentMessage(CPlayerAssignmentMessage& message)
{
for (const std::pair<CStr, PlayerAssignment>& p : m_PlayerAssignments)
for (const std::pair<const CStr, PlayerAssignment>& p : m_PlayerAssignments)
{
if (!p.second.m_Enabled)
continue;
@ -1022,7 +1022,7 @@ bool CNetServerWorker::OnAuthenticate(void* context, CFsmEvent* event)
int disconnectedPlayers = 0;
int connectedPlayers = 0;
// (TODO: if GUIDs were stable, we should use them instead)
for (const std::pair<CStr, PlayerAssignment>& p : server.m_PlayerAssignments)
for (const std::pair<const CStr, PlayerAssignment>& p : server.m_PlayerAssignments)
{
const PlayerAssignment& assignment = p.second;

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2020 Wildfire Games.
/* Copyright (C) 2021 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -127,7 +127,7 @@ void CNetServerTurnManager::NotifyFinishedClientUpdate(CNetServerSession& sessio
newest = clientSimulated.second;
// For every set of state hashes that all clients have simulated, check for OOS
for (const std::pair<u32, std::map<int, std::string>>& clientStateHash : m_ClientStateHashes)
for (const std::pair<const u32, std::map<int, std::string>>& clientStateHash : m_ClientStateHashes)
{
if (clientStateHash.first > newest)
break;