From 45ccf501f04b062287fd416b35451ce5ed55cb93 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sun, 26 Jul 2015 21:12:36 +0200 Subject: [PATCH] Fix ARM build with Visual Studio --- src/lib/openjp2/opj_includes.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/openjp2/opj_includes.h b/src/lib/openjp2/opj_includes.h index 0d8c1ff3..bd9ae09a 100644 --- a/src/lib/openjp2/opj_includes.h +++ b/src/lib/openjp2/opj_includes.h @@ -129,7 +129,7 @@ static INLINE long opj_lrintf(float f){ /* commented out line breaks many tests */ /* return (long)((f>0.0f) ? (f + 0.5f):(f -0.5f)); */ -#else +#elif defined(_M_IX86) int i; _asm{ fld f @@ -137,6 +137,8 @@ static INLINE long opj_lrintf(float f){ }; return i; +#else + return (long)((f>0.0f) ? (f + 0.5f) : (f - 0.5f)); #endif } #elif defined(__BORLANDC__) -- 2.40.0