From 57c1c6cb9b6c9e77c956f4310a9eb150ecf24e20 Mon Sep 17 00:00:00 2001 From: "Bart A.M. Jourquin" <bart.jourquin@fucam.ac.be> Date: Mon, 7 Feb 2000 10:07:00 +0000 Subject: [PATCH] add casts + type to untyped const for GCC2.95 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/image.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/image.cpp b/src/common/image.cpp index e1d156365c..e9435b5a46 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -2756,11 +2756,11 @@ wxImage wxImage::Rotate(double angle, const wxPoint & centre_of_rotation, bool i wxRotationPoint p3 = rotated_point (img.GetWidth(), 0, cos_angle, sin_angle, p0); wxRotationPoint p4 = rotated_point (img.GetWidth(), img.GetHeight(), cos_angle, sin_angle, p0); - int x1 = floor (wxMin (wxMin(p1.x, p2.x), wxMin(p3.x, p4.x))); - int y1 = floor (wxMin (wxMin(p1.y, p2.y), wxMin(p3.y, p4.y))); + int x1 = (int) floor (wxMin (wxMin(p1.x, p2.x), wxMin(p3.x, p4.x))); + int y1 = (int) floor (wxMin (wxMin(p1.y, p2.y), wxMin(p3.y, p4.y))); - int x2 = ceil (wxMax (wxMax(p1.x, p2.x), wxMax(p3.x, p4.x))); - int y2 = ceil (wxMax (wxMax(p1.y, p2.y), wxMax(p3.y, p4.y))); + int x2 = (int) ceil (wxMax (wxMax(p1.x, p2.x), wxMax(p3.x, p4.x))); + int y2 = (int) ceil (wxMax (wxMax(p1.y, p2.y), wxMax(p3.y, p4.y))); wxImage rotated (x2 - x1 + 1, y2 - y1 + 1); @@ -2841,7 +2841,7 @@ wxImage wxImage::Rotate(double angle, const wxPoint & centre_of_rotation, bool i else { // weights for the weighted average are proportional to the inverse of the distance - const w1 = 1/d1, w2 = 1/d2, w3 = 1/d3, w4 = 1/d4; + const double w1 = 1/d1, w2 = 1/d2, w3 = 1/d3, w4 = 1/d4; for (int i = 0; i < 3; i++) // repeat calculation for R, G, and B { -- 2.47.2