From d31d30d791201146a5e224d3bf0f0cd909300bba Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 12 Nov 2008 14:32:28 +0000 Subject: [PATCH] there is no sqrt(int) in standard C++ (although glibc seems to provide it); select sqrt(double) explicitly to fix HP-UX compilation git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/print.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gtk/print.cpp b/src/gtk/print.cpp index 02f8376d5d..8f8a48239b 100644 --- a/src/gtk/print.cpp +++ b/src/gtk/print.cpp @@ -1192,7 +1192,8 @@ void wxGtkPrinterDCImpl::DoGradientFillConcentric(const wxRect& rect, const wxCo wxCoord w = rect.width; wxCoord h = rect.height; - double radius = sqrt((w/2)*(w/2)+(h/2)*(h/2)); + const double r2 = (w/2)*(w/2)+(h/2)*(h/2); + double radius = sqrt(r2); unsigned char redI = initialColour.Red(); unsigned char blueI = initialColour.Blue();