mirror of https://github.com/OpenTTD/OpenTTD
(svn r12150) -Fix (r12143): compiler warnings - possible use of uninitialised variable
parent
a40d761d7f
commit
a5f99154b7
|
@ -204,7 +204,7 @@ static PlayerID GetBestPlayer(uint8 pp)
|
||||||
PlayerID best_player;
|
PlayerID best_player;
|
||||||
uint mask = 0;
|
uint mask = 0;
|
||||||
|
|
||||||
for (; pp != 0; pp--) {
|
do {
|
||||||
best_hist = -1;
|
best_hist = -1;
|
||||||
best_player = PLAYER_SPECTATOR;
|
best_player = PLAYER_SPECTATOR;
|
||||||
FOR_ALL_PLAYERS(p) {
|
FOR_ALL_PLAYERS(p) {
|
||||||
|
@ -218,7 +218,7 @@ static PlayerID GetBestPlayer(uint8 pp)
|
||||||
if (best_player == PLAYER_SPECTATOR) return PLAYER_SPECTATOR;
|
if (best_player == PLAYER_SPECTATOR) return PLAYER_SPECTATOR;
|
||||||
|
|
||||||
SetBit(mask, best_player);
|
SetBit(mask, best_player);
|
||||||
}
|
} while (--p != 0);
|
||||||
|
|
||||||
return best_player;
|
return best_player;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue