From 81db0022e50e25d922ac7d67d9ec6017b8856f13 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 25 Feb 2012 21:28:51 +0300 Subject: Fix old casts. --- src/openglgraphics.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/openglgraphics.cpp') diff --git a/src/openglgraphics.cpp b/src/openglgraphics.cpp index bcf46e18b..d972a738f 100644 --- a/src/openglgraphics.cpp +++ b/src/openglgraphics.cpp @@ -554,8 +554,10 @@ void OpenGLGraphics::drawRescaledImagePattern(Image *image, { int width = (px + scaledWidth >= w) ? w - px : scaledWidth; int dstX = x + px; - const float visibleFractionW = (float) width / scaledWidth; - const float visibleFractionH = (float) height / scaledHeight; + const float visibleFractionW = static_cast(width) + / scaledWidth; + const float visibleFractionH = static_cast(height) + / scaledHeight; const float texX2 = texX1 + tFractionW * visibleFractionW; const float texY2 = texY1 + tFractionH * visibleFractionH; @@ -597,8 +599,8 @@ void OpenGLGraphics::drawRescaledImagePattern(Image *image, } else { - const float scaleFactorW = (float) scaledWidth / iw; - const float scaleFactorH = (float) scaledHeight / ih; + const float scaleFactorW = static_cast(scaledWidth) / iw; + const float scaleFactorH = static_cast(scaledHeight) / ih; for (int py = 0; py < h; py += scaledHeight) { -- cgit v1.2.3-70-g09d2