[Scummvm-git-logs] scummvm master -> 6e097626ced1aa272ca789ca3d38f0f0b22572fb

digitall noreply at scummvm.org
Sat Dec 4 16:15:34 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:
6e097626ce KYRA: Fix GCC Signed vs. Unsigned Comparison Compiler Warnings


Commit: 6e097626ced1aa272ca789ca3d38f0f0b22572fb
    https://github.com/scummvm/scummvm/commit/6e097626ced1aa272ca789ca3d38f0f0b22572fb
Author: D G Turner (digitall at scummvm.org)
Date: 2021-12-04T16:14:46Z

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

Changed paths:
    engines/kyra/graphics/screen.cpp


diff --git a/engines/kyra/graphics/screen.cpp b/engines/kyra/graphics/screen.cpp
index 7ee566b00c..b617271b72 100644
--- a/engines/kyra/graphics/screen.cpp
+++ b/engines/kyra/graphics/screen.cpp
@@ -1417,11 +1417,11 @@ int Screen::getTextWidth(const char *str, bool nextWordOnly) {
 		if (_sjisMixedFontMode && curType == Font::kASCII)
 			setFont((*str & 0x80) ? ((_vm->game() == GI_EOB2 && curFont == FID_6_FNT) ? FID_SJIS_SMALL_FNT : FID_SJIS_FNT) : curFont);
 
-		uint c = fetchChar(str);
+		uint16 c = fetchChar(str);
 
 		if (c == 0 || (nextWordOnly && (c == 2 || c == 6 || c == 13 || c == 32 || c == 0x4081))) {
 			break;
-		} else if (c == _lineBreakChar) {
+		} else if (c == (uint16)_lineBreakChar) {
 			if (curLineLen > maxLineLen)
 				maxLineLen = curLineLen;
 			else
@@ -1475,12 +1475,12 @@ void Screen::printText(const char *str, int x, int y, uint8 color1, uint8 color2
 		if (_sjisMixedFontMode && curType == Font::kASCII)
 			setFont((*str & 0x80) ? ((_vm->game() == GI_EOB2 && curFont == FID_6_FNT) ? FID_SJIS_SMALL_FNT : FID_SJIS_FNT) : curFont);
 
-		uint c = fetchChar(str);
+		uint16 c = fetchChar(str);
 		charHeight = MAX<int>(charHeight, getCharHeight(c));
 
 		if (c == 0) {
 			break;
-		} else if (c == _lineBreakChar) {
+		} else if (c == (uint16)_lineBreakChar) {
 			x = x_start;
 			y += (charHeight + _lineSpacing);
 		} else {




More information about the Scummvm-git-logs mailing list