summaryrefslogtreecommitdiff
path: root/src/blitter/32bpp_anim.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-11-12 08:26:30 +0000
committerrubidium <rubidium@openttd.org>2011-11-12 08:26:30 +0000
commit4f87d2e88c4b42f4ae4a5c7956f2287740ef174b (patch)
treed390107524182c8276e616c20612708f9c893f7d /src/blitter/32bpp_anim.cpp
parentbd64bf6372399bad1a92565ae7d3c243658d241f (diff)
downloadopenttd-4f87d2e88c4b42f4ae4a5c7956f2287740ef174b.tar.xz
(svn r23194) -Codechange: don't cast away const needlessly
Diffstat (limited to 'src/blitter/32bpp_anim.cpp')
-rw-r--r--src/blitter/32bpp_anim.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/blitter/32bpp_anim.cpp b/src/blitter/32bpp_anim.cpp
index 17ea0af72..be8c26f6c 100644
--- a/src/blitter/32bpp_anim.cpp
+++ b/src/blitter/32bpp_anim.cpp
@@ -44,7 +44,7 @@ inline void Blitter_32bppAnim::Draw(const Blitter::BlitterParams *bp, ZoomLevel
const Colour *src_px_ln = (const Colour *)((const byte *)src_px + *(const uint32 *)src_px);
src_px++;
- const uint8 *src_n_ln = src_n + *(uint32 *)src_n;
+ const uint8 *src_n_ln = src_n + *(const uint32 *)src_n;
src_n += 4;
uint32 *dst_end = dst + bp->skip_left;
@@ -296,7 +296,7 @@ void Blitter_32bppAnim::CopyFromBuffer(void *video, const void *src, int width,
assert(!_screen_disable_anim);
assert(video >= _screen.dst_ptr && video <= (uint32 *)_screen.dst_ptr + _screen.width + _screen.height * _screen.pitch);
uint32 *dst = (uint32 *)video;
- uint32 *usrc = (uint32 *)src;
+ const uint32 *usrc = (const uint32 *)src;
uint8 *anim_line = ((uint32 *)video - (uint32 *)_screen.dst_ptr) + this->anim_buf;
for (; height > 0; height--) {
@@ -309,7 +309,7 @@ void Blitter_32bppAnim::CopyFromBuffer(void *video, const void *src, int width,
dst += _screen.pitch;
/* Copy back the anim-buffer */
memcpy(anim_line, usrc, width * sizeof(uint8));
- usrc = (uint32 *)((uint8 *)usrc + width);
+ usrc = (const uint32 *)((const uint8 *)usrc + width);
anim_line += this->anim_buf_width;
/* Okay, it is *very* likely that the image we stored is using
@@ -336,12 +336,12 @@ void Blitter_32bppAnim::CopyToBuffer(const void *video, void *dst, int width, in
assert(!_screen_disable_anim);
assert(video >= _screen.dst_ptr && video <= (uint32 *)_screen.dst_ptr + _screen.width + _screen.height * _screen.pitch);
uint32 *udst = (uint32 *)dst;
- uint32 *src = (uint32 *)video;
- uint8 *anim_line;
+ const uint32 *src = (const uint32 *)video;
+ const uint8 *anim_line;
if (this->anim_buf == NULL) return;
- anim_line = ((uint32 *)video - (uint32 *)_screen.dst_ptr) + this->anim_buf;
+ anim_line = ((const uint32 *)video - (uint32 *)_screen.dst_ptr) + this->anim_buf;
for (; height > 0; height--) {
memcpy(udst, src, width * sizeof(uint32));