diff options
| author | mayeut <mayeut@users.noreply.github.com> | 2015-07-26 21:12:36 +0200 |
|---|---|---|
| committer | mayeut <mayeut@users.noreply.github.com> | 2015-07-26 21:12:36 +0200 |
| commit | 45ccf501f04b062287fd416b35451ce5ed55cb93 (patch) | |
| tree | 37270a982bd6c552a07e2a495ffc4e9ea7a0486b /src | |
| parent | 15e4168ee2c23b1a1ee41a9020601459e607b630 (diff) | |
Fix ARM build with Visual Studio
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/openjp2/opj_includes.h | 4 |
1 files changed, 3 insertions, 1 deletions
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__) |
