[Scummvm-git-logs] scummvm master -> 6ea3c50760590a8e0ebc1877a1832f5d955981e5
digitall
noreply at scummvm.org
Sun Oct 6 02:42:10 UTC 2024
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
6ea3c50760 QDENGINE: Fix Signed vs. Unsigned Comparison GCC Compiler Warnings
Commit: 6ea3c50760590a8e0ebc1877a1832f5d955981e5
https://github.com/scummvm/scummvm/commit/6ea3c50760590a8e0ebc1877a1832f5d955981e5
Author: D G Turner (digitall at scummvm.org)
Date: 2024-10-06T03:41:49+01:00
Commit Message:
QDENGINE: Fix Signed vs. Unsigned Comparison GCC Compiler Warnings
Changed paths:
engines/qdengine/debugger/debugtools.cpp
engines/qdengine/system/graphics/gr_tile_animation.cpp
diff --git a/engines/qdengine/debugger/debugtools.cpp b/engines/qdengine/debugger/debugtools.cpp
index fe6bfa30fa2..17daf2c85b2 100644
--- a/engines/qdengine/debugger/debugtools.cpp
+++ b/engines/qdengine/debugger/debugtools.cpp
@@ -176,7 +176,7 @@ void populateFileList() {
treeStack.push(&_state->_files);
int id = 0;
- for (int f = 0; f < files.size(); f++) {
+ for (unsigned int f = 0; f < files.size(); f++) {
// Skip duplicates between the archives
if (f && files[f] == files[f - 1])
continue;
@@ -193,13 +193,13 @@ void populateFileList() {
if (newArr.back().empty())
newArr.pop_back();
- int pos = 0;
+ unsigned int pos = 0;
while (pos < curArr.size() && pos < newArr.size() && curArr[pos] == newArr[pos])
pos++;
// if we need to close directories
if (pos < curArr.size()) {
- for (int i = pos; i < curArr.size(); i++)
+ for (unsigned int i = pos; i < curArr.size(); i++)
(void)treeStack.pop();
}
@@ -438,7 +438,7 @@ void onImGuiRender() {
if (!_state)
return;
- if (_state->_qdaIsPlaying && g_system->getMillis() > _state->_qdaNextFrameTimestamp) {
+ if (_state->_qdaIsPlaying && (int)g_system->getMillis() > _state->_qdaNextFrameTimestamp) {
_state->_qdaToDisplayFrame++;
_state->_qdaToDisplayFrame %= _state->_qdaToDisplayFrameCount;
diff --git a/engines/qdengine/system/graphics/gr_tile_animation.cpp b/engines/qdengine/system/graphics/gr_tile_animation.cpp
index 59b86c06c69..185a9c2c20a 100644
--- a/engines/qdengine/system/graphics/gr_tile_animation.cpp
+++ b/engines/qdengine/system/graphics/gr_tile_animation.cpp
@@ -129,7 +129,7 @@ grTileSprite grTileAnimation::getTile(int tile_index) const {
case TILE_UNCOMPRESSED:
return grTileSprite(&*_tileData.begin() + _tileOffsets[tile_index]);
default:
- if (tile_index >= _tileOffsets.size()) {
+ if (tile_index >= (int)_tileOffsets.size()) {
warning("grTileAnimation::getTile(): Too big tile index %d >= %d", tile_index, _tileOffsets.size());
break;
}
@@ -611,7 +611,7 @@ Graphics::ManagedSurface *grTileAnimation::dumpFrameTiles(int frame_index, float
for (int i = 0; i < frameTileSize.y; i++) {
for (int j = 0; j < frameTileSize.x; j++) {
- if (idx >= _frameIndex.size()) {
+ if (idx >= (int)_frameIndex.size()) {
warning("grTileAnimation::dumpFrameTiles(): overflow of frame index (%d > %d)", idx, _frameIndex.size());
break;
}
@@ -650,11 +650,11 @@ Graphics::ManagedSurface *grTileAnimation::dumpTiles(int tilesPerRow) const {
grDispatcher::instance()->putTileSpr(x, y, getTile(index++), _hasAlpha, 0, dstSurf, false);
x += GR_TILE_SPRITE_SIZE_X + 1;
- if (index >= _tileOffsets.size())
+ if (index >= (int)_tileOffsets.size())
break;
}
- if (index >= _tileOffsets.size())
+ if (index >= (int)_tileOffsets.size())
break;
y += GR_TILE_SPRITE_SIZE_X + 1;
More information about the Scummvm-git-logs
mailing list