From: Vadim Zeitlin Date: Fri, 13 Jul 2007 11:14:49 +0000 (+0000) Subject: cast abs() argument to int to fix compilation with BC++ 2007 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ee8fd6b1bdcae7c7d34a4c7c142895dd4c4573fb cast abs() argument to int to fix compilation with BC++ 2007 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47424 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/font.cpp b/src/msw/font.cpp index 8023ed0e3d..eec88f8c06 100644 --- a/src/msw/font.cpp +++ b/src/msw/font.cpp @@ -476,7 +476,8 @@ int wxNativeFontInfo::GetPointSize() const // for printing! const int ppInch = ::GetDeviceCaps(ScreenHDC(), LOGPIXELSY); - return (int) (((72.0*(double)abs(lf.lfHeight)) / (double) ppInch) + 0.5); + // BC++ 2007 doesn't provide abs(long) overload, hence the cast + return (int) (((72.0*abs((int)lf.lfHeight)) / (double) ppInch) + 0.5); } wxSize wxNativeFontInfo::GetPixelSize() const