From: mayeut Date: Sun, 26 Jul 2015 19:12:36 +0000 (+0200) Subject: Fix ARM build with Visual Studio X-Git-Tag: v2.1.1~22^2~93 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=45ccf501f04b062287fd416b35451ce5ed55cb93;p=openjpeg Fix ARM build with Visual Studio --- 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__)