From 6593e51be481f91379970bc2fdda9cdc81fde251 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 17 Jul 2012 13:05:57 +1000 Subject: Avoid loss of precision warnings from Borland. --- win32/PlatWin.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'win32') diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index ffb129d49..507567bb8 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -848,10 +848,10 @@ void SurfaceGDI::DrawRGBAImage(PRectangle rc, int width, int height, const unsig unsigned char *pixel = image + (y*width+x) * 4; unsigned char alpha = pixelsImage[3]; // Input is RGBA, output is BGRA with premultiplied alpha - pixel[2] = (*pixelsImage++) * alpha / 255; - pixel[1] = (*pixelsImage++) * alpha / 255; - pixel[0] = (*pixelsImage++) * alpha / 255; - pixel[3] = *pixelsImage++; + pixel[2] = static_cast((*pixelsImage++) * alpha / 255); + pixel[1] = static_cast((*pixelsImage++) * alpha / 255); + pixel[0] = static_cast((*pixelsImage++) * alpha / 255); + pixel[3] = static_cast(*pixelsImage++); } } -- cgit v1.2.3