From c69173e9bdafb266f443ba5ebecfd7c49af30b79 Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Sun, 19 Jun 2022 14:52:35 +0100 Subject: [PATCH] Fix `-Wsign-compare` in `SetDungeonMicros` --- Source/gendung.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/gendung.cpp b/Source/gendung.cpp index d3c38a669..5972d72ad 100644 --- a/Source/gendung.cpp +++ b/Source/gendung.cpp @@ -478,7 +478,7 @@ void LoadLevelSOLData() void SetDungeonMicros() { MicroTileLen = 10; - int blocks = 10; + size_t blocks = 10; if (leveltype == DTYPE_TOWN) { MicroTileLen = 16; @@ -491,9 +491,9 @@ void SetDungeonMicros() size_t tileCount; std::unique_ptr levelPieces = LoadMinData(tileCount); - for (int i = 0; i < tileCount / blocks; i++) { + for (size_t i = 0; i < tileCount / blocks; i++) { uint16_t *pieces = &levelPieces[blocks * i]; - for (int block = 0; block < blocks; block++) { + for (size_t block = 0; block < blocks; block++) { DPieceMicros[i].mt[block] = SDL_SwapLE16(pieces[blocks - 2 + (block & 1) - (block & 0xE)]); } }