[Scummvm-cvs-logs] scummvm master -> 5188a954a68c1a4136d10d7f0812a26140540cc0

eriktorbjorn eriktorbjorn at telia.com
Wed Jun 15 06:06:48 CEST 2016


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:
5188a954a6 SCUMM HE: Fix GCC warnings about casting away [const] qualifiers


Commit: 5188a954a68c1a4136d10d7f0812a26140540cc0
    https://github.com/scummvm/scummvm/commit/5188a954a68c1a4136d10d7f0812a26140540cc0
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2016-06-15T06:05:49+02:00

Commit Message:
SCUMM HE: Fix GCC warnings about casting away [const] qualifiers

I hope this is correct. I don't know when the function is used.

Changed paths:
    engines/scumm/he/moonbase/distortion.cpp



diff --git a/engines/scumm/he/moonbase/distortion.cpp b/engines/scumm/he/moonbase/distortion.cpp
index 7e0a30b..4f09ba5 100644
--- a/engines/scumm/he/moonbase/distortion.cpp
+++ b/engines/scumm/he/moonbase/distortion.cpp
@@ -60,7 +60,7 @@ static void blitDistortionCore(
 
 	distortionRect.moveTo(dstRect.left - x, dstRect.top - y);
 
-	byte *distortionPtr = (byte *)distortionBitmap->getBasePtr(distortionRect.left, distortionRect.top);
+	const byte *distortionPtr = (const byte *)distortionBitmap->getBasePtr(distortionRect.left, distortionRect.top);
 	byte *dstPtr = (byte *)dstBitmap->getBasePtr(dstRect.left, dstRect.top);
 	int cw = dstRect.width();
 	int ch = dstRect.height();
@@ -68,7 +68,7 @@ static void blitDistortionCore(
 	int dy = dstRect.top;
 
 	int baseX, baseY;
-	byte *srcData = (byte *)srcBitmap->getBasePtr(0, 0);
+	const byte *srcData = (const byte *)srcBitmap->getBasePtr(0, 0);
 	int srcPitch = srcBitmap->pitch;
 
 	switch (transferOp) {
@@ -86,7 +86,7 @@ static void blitDistortionCore(
 
 	while (--ch >= 0) {
 		uint16 *d = (uint16 *)dstPtr;
-		uint16 *is = (uint16 *)distortionPtr;
+		const uint16 *is = (const uint16 *)distortionPtr;
 		int dx = idx;
 
 		for (int i = cw; --i >= 0;) {
@@ -112,7 +112,7 @@ static void blitDistortionCore(
 				sy = MAX<int>(srcClipRect->top, MIN<int>(sy, srcClipRect->bottom));
 			}
 
-			*d = *((uint16 *)(srcData + sy * srcPitch + sx * 2));
+			*d = *((const uint16 *)(srcData + sy * srcPitch + sx * 2));
 
 			++d;
 			++is;






More information about the Scummvm-git-logs mailing list