From ec0b903a1d65319246b3149e2de0c6a2e5042d82 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 14 Jul 2007 11:07:40 +0000 Subject: [PATCH] cast abs() argument to int (from long) as BCC 2007 doesn't define abs(long) overload in stdlib.h (only cstdlib) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@47455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/bitmap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msw/bitmap.cpp b/src/msw/bitmap.cpp index e2a27b4aca..feb04a039c 100644 --- a/src/msw/bitmap.cpp +++ b/src/msw/bitmap.cpp @@ -1626,7 +1626,7 @@ bool wxCreateDIB(long xSize, long ySize, long bitsPerPixel, // this value must be 1, 4, 8 or 24 so PixelDepth can only be lpDIBheader->bmiHeader.biBitCount = (WORD)(bitsPerPixel); lpDIBheader->bmiHeader.biCompression = BI_RGB; - lpDIBheader->bmiHeader.biSizeImage = (xSize * abs(ySize) * bitsPerPixel) >> 3; + lpDIBheader->bmiHeader.biSizeImage = (xSize * abs((int)ySize) * bitsPerPixel) >> 3; lpDIBheader->bmiHeader.biClrUsed = 256;