aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjörn Andersson2016-06-15 06:05:49 +0200
committerTorbjörn Andersson2016-06-15 06:05:49 +0200
commit5188a954a68c1a4136d10d7f0812a26140540cc0 (patch)
treef3bdc1d1672d3eeb08c78c9c5f71668b827ef26c
parentffcab2fa5dfea99601cd214a08cdce0a0f0d5301 (diff)
downloadscummvm-rg350-5188a954a68c1a4136d10d7f0812a26140540cc0.tar.gz
scummvm-rg350-5188a954a68c1a4136d10d7f0812a26140540cc0.tar.bz2
scummvm-rg350-5188a954a68c1a4136d10d7f0812a26140540cc0.zip
SCUMM HE: Fix GCC warnings about casting away [const] qualifiers
I hope this is correct. I don't know when the function is used.
-rw-r--r--engines/scumm/he/moonbase/distortion.cpp8
1 files 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<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;