Fixes sign-compare warnings

This commit is contained in:
Marcus Minhorst 2025-07-18 18:47:44 -04:00 committed by Ricardo Luís Vaz Silva
commit 9b0f5d9b0d
41 changed files with 109 additions and 108 deletions

View file

@ -603,7 +603,7 @@ void FLevelLocals::SerializeSounds(FSerializer &arc)
void FLevelLocals::SerializePlayers(FSerializer &arc, bool skipload)
{
int numPlayers, numPlayersNow;
int i;
uint i;
// Count the number of players present right now.
for (numPlayersNow = 0, i = 0; i < MAXPLAYERS; ++i)
@ -690,7 +690,7 @@ void FLevelLocals::ReadOnePlayer(FSerializer &arc, bool fromHub)
player_t temp = {};
temp.Serialize(arc);
for (int i = 0; i < MAXPLAYERS; ++i)
for (uint i = 0; i < MAXPLAYERS; ++i)
{
if (!PlayerInGame(i))
continue;
@ -751,7 +751,7 @@ void FLevelLocals::ReadMultiplePlayers(FSerializer &arc, int numPlayers, bool fr
// based on their names. If two players in the savegame have the
// same name, then they are assigned to players in the current game
// on a first-come, first-served basis.
for (int i = 0; i < MAXPLAYERS; ++i)
for (uint i = 0; i < MAXPLAYERS; ++i)
{
if (!PlayerInGame(i))
continue;
@ -780,7 +780,7 @@ void FLevelLocals::ReadMultiplePlayers(FSerializer &arc, int numPlayers, bool fr
// Any players that didn't have matching names are assigned to existing
// players on a first-come, first-served basis.
for (int i = 0; i < MAXPLAYERS; ++i)
for (uint i = 0; i < MAXPLAYERS; ++i)
{
if (!PlayerInGame(i) || assignedPlayers[i])
continue;
@ -893,7 +893,7 @@ void FLevelLocals::SpawnExtraPlayers()
{
// If there are more players now than there were in the savegame,
// be sure to spawn the extra players.
int i;
uint i;
if (deathmatch || !isPrimaryLevel())
{
@ -1046,7 +1046,7 @@ void FLevelLocals::Serialize(FSerializer &arc, bool hubload)
{
P_Recalculate3DFloors(&sec);
}
for (int i = 0; i < MAXPLAYERS; ++i)
for (uint i = 0; i < MAXPLAYERS; ++i)
{
if (PlayerInGame(i) && Players[i]->mo != nullptr)
{
@ -1125,7 +1125,7 @@ void FLevelLocals::UnSnapshotLevel(bool hubLoad)
next = it.Next();
if (pawn->player == nullptr || pawn->player->mo == nullptr || !PlayerInGame(pawn->player))
{
int i;
uint i;
// If this isn't the unmorphed original copy of a player, destroy it, because it's extra.
for (i = 0; i < MAXPLAYERS; ++i)