From a900ba5ee5fa0ee433e68f47ecd325ef859f213a Mon Sep 17 00:00:00 2001 From: Jackburton79 Date: Wed, 30 Oct 2024 20:27:46 +0100 Subject: [PATCH] Cast simplification --- BSCApp.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/BSCApp.cpp b/BSCApp.cpp index f3cdff4..be1d90b 100644 --- a/BSCApp.cpp +++ b/BSCApp.cpp @@ -1044,14 +1044,14 @@ BSCApp::ReadBitmap(BBitmap* bitmap, bool includeCursor, BRect bounds) ((uint32)bounds.top * rowBytes)) * bytesPerPixel; const int32 height = bounds.IntegerHeight() + 1; - void* from = (void*)((uint8*)fDirectInfo.bits + offset); - void* to = bitmap->Bits(); + uint8* from = reinterpret_cast(fDirectInfo.bits) + offset; + uint8* to = reinterpret_cast(bitmap->Bits()); const int32 bytesPerRow = bitmap->BytesPerRow(); const int32 areaSize = (bounds.IntegerWidth() + 1) * bytesPerPixel; for (int32 y = 0; y < height; y++) { ::memcpy(to, from, areaSize); - to = (void*)((uint8*)to + bytesPerRow); - from = (void*)((uint8*)from + fDirectInfo.bytes_per_row); + to += bytesPerRow; + from += fDirectInfo.bytes_per_row; } return B_OK;