From d1dee3c9092b7c270b297366757c9fc8d03bb0dd Mon Sep 17 00:00:00 2001 From: Mattes D Date: Tue, 2 Aug 2016 13:12:34 +0200 Subject: Fixed RasPi builds of unit tests. On RasPi with gcc 4.8.2, the asserts wouldn't compile when tests were enabled. Enforced the assumption that ASSERT code is generated only in Debug builds. --- src/LinearUpscale.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/LinearUpscale.h') diff --git a/src/LinearUpscale.h b/src/LinearUpscale.h index b75cb4f82..d0c2bb41a 100644 --- a/src/LinearUpscale.h +++ b/src/LinearUpscale.h @@ -118,7 +118,9 @@ template void LinearUpscale2DArray( // Interpolate each XY cell: int DstSizeX = (a_SrcSizeX - 1) * a_UpscaleX + 1; - int DstSizeY = (a_SrcSizeY - 1) * a_UpscaleY + 1; + #ifdef _DEBUG + int DstSizeY = (a_SrcSizeY - 1) * a_UpscaleY + 1; + #endif for (int y = 0; y < (a_SrcSizeY - 1); y++) { int DstY = y * a_UpscaleY; @@ -198,7 +200,9 @@ template void LinearUpscale3DArray( // Interpolate each XYZ cell: int DstSizeX = (a_SrcSizeX - 1) * a_UpscaleX + 1; int DstSizeY = (a_SrcSizeY - 1) * a_UpscaleY + 1; - int DstSizeZ = (a_SrcSizeZ - 1) * a_UpscaleZ + 1; + #ifdef _DEBUG + int DstSizeZ = (a_SrcSizeZ - 1) * a_UpscaleZ + 1; + #endif for (int z = 0; z < (a_SrcSizeZ - 1); z++) { int DstZ = z * a_UpscaleZ; -- cgit v1.2.3