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
This commit is contained in:
Vadim Zeitlin
2007-07-14 11:07:40 +00:00
parent e945389331
commit ec0b903a1d

View File

@@ -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;