From 87a66fca82815bbf133e3802bbfd2bbad3e7caa8 Mon Sep 17 00:00:00 2001 From: Delio Brignoli Date: Mon, 25 Dec 2017 13:05:13 +0100 Subject: [PATCH] Remove unnecessary type casts from Sprites::drawBitmap() --- src/Sprites.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Sprites.cpp b/src/Sprites.cpp index 03e94f9..979ef95 100644 --- a/src/Sprites.cpp +++ b/src/Sprites.cpp @@ -133,8 +133,8 @@ void Sprites::drawBitmap(int16_t x, int16_t y, const uint8_t ofs_stride = (w - rendered_width)*ofs_step; const uint8_t initial_bofs = ((start_h * w) + xOffset)*ofs_step; - uint8_t *bofs = (uint8_t *)bitmap + initial_bofs; - uint8_t *mask_ofs = !mask ? (uint8_t *)bitmap : (uint8_t *)mask; + const uint8_t *bofs = bitmap + initial_bofs; + const uint8_t *mask_ofs = !mask ? bitmap : mask; mask_ofs += initial_bofs + ofs_step - 1; for (uint8_t a = 0; a < loop_h; a++) {