1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Silenced several "warning: suggest parentheses around ‘&&’ within ‘||’": added some parenthesis, optimized a couple statments and fix a bug in another.

This commit is contained in:
Frank Zago
2011-05-30 19:20:14 +00:00
parent 2d3caec79b
commit ff49b852df
7 changed files with 28 additions and 27 deletions

View File

@@ -323,9 +323,9 @@ void CClient::newGame( CConnection *con, StartInfo *si )
for(std::map<int, PlayerSettings>::iterator it =si->playerInfos.begin();
it != si->playerInfos.end(); ++it)
{
if(networkMode == SINGLE //single - one client has all player
|| networkMode != SINGLE && serv->connectionID == it->second.human //multi - client has only "its players"
|| networkMode == HOST && it->second.human == false) //multi - host has all AI players
if((networkMode == SINGLE) //single - one client has all player
|| (networkMode != SINGLE && serv->connectionID == it->second.human) //multi - client has only "its players"
|| (networkMode == HOST && it->second.human == false)) //multi - host has all AI players
{
myPlayers.insert(ui8(it->first)); //add player
}