[Scummvm-git-logs] scummvm master -> 3c0d2109cd4ca2fa295fba52be030821f2d1e0b8

digitall 547637+digitall at users.noreply.github.com
Fri Mar 26 00:27:09 UTC 2021


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:
3c0d2109cd BURIED: Fix Signed vs. Unsigned Comparison GCC Compiler Warnings


Commit: 3c0d2109cd4ca2fa295fba52be030821f2d1e0b8
    https://github.com/scummvm/scummvm/commit/3c0d2109cd4ca2fa295fba52be030821f2d1e0b8
Author: D G Turner (digitall at scummvm.org)
Date: 2021-03-26T00:25:10Z

Commit Message:
BURIED: Fix Signed vs. Unsigned Comparison GCC Compiler Warnings

Changed paths:
    engines/buried/graphics.cpp
    engines/buried/scene_view.cpp


diff --git a/engines/buried/graphics.cpp b/engines/buried/graphics.cpp
index 857fccece5..34776dcc10 100644
--- a/engines/buried/graphics.cpp
+++ b/engines/buried/graphics.cpp
@@ -290,7 +290,7 @@ void GraphicsManager::blit(const Graphics::Surface *surface, int x, int y) {
 void GraphicsManager::blit(const Graphics::Surface *surface, int x, int y, uint width, uint height) {
 	assert(surface->format.bytesPerPixel == _screen->format.bytesPerPixel);
 
-	for (int i = 0; i < height; i++)
+	for (uint i = 0; i < height; i++)
 		memcpy(_screen->getBasePtr(x, y + i), surface->getBasePtr(0, i), width * surface->format.bytesPerPixel);
 }
 
@@ -300,7 +300,7 @@ void GraphicsManager::blit(const Graphics::Surface *surface, const Common::Rect
 	uint width = MIN(srcRect.width(), dstRect.width());
 	uint height = MIN(srcRect.height(), dstRect.height());
 
-	for (int i = 0; i < height; i++)
+	for (uint i = 0; i < height; i++)
 		memcpy(_screen->getBasePtr(dstRect.left, dstRect.top + i), surface->getBasePtr(srcRect.left, srcRect.top + i), width * surface->format.bytesPerPixel);
 }
 
@@ -548,7 +548,7 @@ int GraphicsManager::computeVPushOffset(int speed) {
 void GraphicsManager::crossBlit(Graphics::Surface *dst, int xDst, int yDst, uint w, uint h, const Graphics::Surface *src, int xSrc, int ySrc) {
 	assert(dst->format.bytesPerPixel == src->format.bytesPerPixel);
 
-	for (int y = 0; y < h; y++)
+	for (uint y = 0; y < h; y++)
 		memcpy(dst->getBasePtr(xDst, yDst + y), src->getBasePtr(xSrc, ySrc + y), w * src->format.bytesPerPixel);
 }
 
diff --git a/engines/buried/scene_view.cpp b/engines/buried/scene_view.cpp
index b8996d0ef8..c61f5e4b23 100644
--- a/engines/buried/scene_view.cpp
+++ b/engines/buried/scene_view.cpp
@@ -1183,7 +1183,7 @@ bool SceneViewWindow::pushTransition(Graphics::Surface *curBackground, Graphics:
 		for (int i = 0; i < DIB_FRAME_HEIGHT; i += stripSize) {
 			curBackground->move(0, stripSize, curBackground->h);
 
-			for (int j = 0; j < stripSize; j++)
+			for (uint j = 0; j < stripSize; j++)
 				memcpy(curBackground->getBasePtr(0, j), newBackground->getBasePtr(0, curBackground->h - (i + stripSize) + j), newBackground->w * newBackground->format.bytesPerPixel);
 
 			invalidateWindow(false);
@@ -1216,7 +1216,7 @@ bool SceneViewWindow::pushTransition(Graphics::Surface *curBackground, Graphics:
 		for (int i = 0; i < DIB_FRAME_HEIGHT; i += stripSize) {
 			curBackground->move(0, -stripSize, curBackground->h);
 
-			for (int j = 0; j < stripSize; j++)
+			for (uint j = 0; j < stripSize; j++)
 				memcpy(curBackground->getBasePtr(0, curBackground->h - stripSize + j), newBackground->getBasePtr(0, i + j), newBackground->w * newBackground->format.bytesPerPixel);
 
 			invalidateWindow(false);




More information about the Scummvm-git-logs mailing list