From 5188a954a68c1a4136d10d7f0812a26140540cc0 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Wed, 15 Jun 2016 06:05:49 +0200 Subject: SCUMM HE: Fix GCC warnings about casting away [const] qualifiers I hope this is correct. I don't know when the function is used. --- engines/scumm/he/moonbase/distortion.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/engines/scumm/he/moonbase/distortion.cpp b/engines/scumm/he/moonbase/distortion.cpp index 7e0a30b826..4f09ba54ed 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(srcClipRect->top, MIN(sy, srcClipRect->bottom)); } - *d = *((uint16 *)(srcData + sy * srcPitch + sx * 2)); + *d = *((const uint16 *)(srcData + sy * srcPitch + sx * 2)); ++d; ++is; -- cgit v1.2.3