summaryrefslogtreecommitdiffstats
path: root/src/LinearUpscale.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2015-07-10 23:36:33 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2015-07-10 23:36:33 +0200
commitd8da11ca91cba780bf75dde3133bd5ef5f3fad95 (patch)
treef005bd76d8f22a28c1b95280642c73780c794e26 /src/LinearUpscale.h
parentNetwork: Fixed ServerHandle's address formatting. (diff)
parentFixed misplaced parens (diff)
downloadcuberite-d8da11ca91cba780bf75dde3133bd5ef5f3fad95.tar
cuberite-d8da11ca91cba780bf75dde3133bd5ef5f3fad95.tar.gz
cuberite-d8da11ca91cba780bf75dde3133bd5ef5f3fad95.tar.bz2
cuberite-d8da11ca91cba780bf75dde3133bd5ef5f3fad95.tar.lz
cuberite-d8da11ca91cba780bf75dde3133bd5ef5f3fad95.tar.xz
cuberite-d8da11ca91cba780bf75dde3133bd5ef5f3fad95.tar.zst
cuberite-d8da11ca91cba780bf75dde3133bd5ef5f3fad95.zip
Diffstat (limited to '')
-rw-r--r--src/LinearUpscale.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/LinearUpscale.h b/src/LinearUpscale.h
index 1b0fbd89a..adc873912 100644
--- a/src/LinearUpscale.h
+++ b/src/LinearUpscale.h
@@ -109,11 +109,11 @@ template <typename TYPE> 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<TYPE>(x) / a_UpscaleX;
}
for (int y = 0; y <= a_UpscaleY; y++)
{
- RatioY[y] = (TYPE)y / a_UpscaleY;
+ RatioY[y] = static_cast<TYPE>(y) / a_UpscaleY;
}
// Interpolate each XY cell:
@@ -184,15 +184,15 @@ template <typename TYPE> 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<TYPE>(x) / a_UpscaleX;
}
for (int y = 0; y <= a_UpscaleY; y++)
{
- RatioY[y] = (TYPE)y / a_UpscaleY;
+ RatioY[y] = static_cast<TYPE>(y) / a_UpscaleY;
}
for (int z = 0; z <= a_UpscaleZ; z++)
{
- RatioZ[z] = (TYPE)z / a_UpscaleZ;
+ RatioZ[z] = static_cast<TYPE>(z) / a_UpscaleZ;
}
// Interpolate each XYZ cell: