From aa94a275c603e7e8bd65cf1b7440017217a86c17 Mon Sep 17 00:00:00 2001 From: Samuel Barney Date: Thu, 9 Jul 2015 11:15:37 -0600 Subject: Fixes compilation failures on MacOSX 10.10 * Replace old c-style casts with c++ casts * Added `-Wno-error=old-style-cast` to Protocol18x.cpp --- src/LinearUpscale.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/LinearUpscale.h') diff --git a/src/LinearUpscale.h b/src/LinearUpscale.h index 1b0fbd89a..d4e9da82a 100644 --- a/src/LinearUpscale.h +++ b/src/LinearUpscale.h @@ -109,11 +109,11 @@ template void LinearUpscale2DArray( TYPE RatioY[MAX_UPSCALE_Y]; for (int x = 0; x <= a_UpscaleX; x++) { - RatioX[x] = (TYPE)x / a_UpscaleX; + RatioX[x] = static_cast(x) / a_UpscaleX; } for (int y = 0; y <= a_UpscaleY; y++) { - RatioY[y] = (TYPE)y / a_UpscaleY; + RatioY[y] = static_cast(y) / a_UpscaleY; } // Interpolate each XY cell: @@ -184,15 +184,15 @@ template void LinearUpscale3DArray( TYPE RatioZ[MAX_UPSCALE_Z]; for (int x = 0; x <= a_UpscaleX; x++) { - RatioX[x] = (TYPE)x / a_UpscaleX; + RatioX[x] = static_cast(x / a_UpscaleX); } for (int y = 0; y <= a_UpscaleY; y++) { - RatioY[y] = (TYPE)y / a_UpscaleY; + RatioY[y] = static_cast(y / a_UpscaleY); } for (int z = 0; z <= a_UpscaleZ; z++) { - RatioZ[z] = (TYPE)z / a_UpscaleZ; + RatioZ[z] = static_cast(z / a_UpscaleZ); } // Interpolate each XYZ cell: -- cgit v1.2.3