diff options
| author | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2013-02-27 08:03:39 +0000 |
|---|---|---|
| committer | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2013-02-27 08:03:39 +0000 |
| commit | 15243144c452365d8251b23955f4ad2cde990e80 (patch) | |
| tree | b6e3d2f216e543b75b6c7a1fafb92926439c522a /libopenjpeg | |
| parent | c0c69d1c364f7df001f6f990a0872b893667458c (diff) | |
[1.5] Rework #ifdef checks. We should check for _M_IX86 instead of not(_M_X64). Thanks to Misha Ulyutin for report on ML
Diffstat (limited to 'libopenjpeg')
| -rw-r--r-- | libopenjpeg/opj_includes.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/libopenjpeg/opj_includes.h b/libopenjpeg/opj_includes.h index 2b5866a9..e9194fd9 100644 --- a/libopenjpeg/opj_includes.h +++ b/libopenjpeg/opj_includes.h @@ -89,18 +89,17 @@ Most compilers implement their own version of this keyword ... /* MSVC and Borland C do not have lrintf */ #if defined(_MSC_VER) || defined(__BORLANDC__) static INLINE long lrintf(float f){ -#ifdef _M_X64 - return (long)((f>0.0f) ? (f + 0.5f):(f -0.5f)); -#else - int i; +#ifdef _M_IX86 + long int i; _asm{ fld f fistp i }; - return i; -#endif +#else + return (long)((f>0.0f) ? (f + 0.5f):(f -0.5f)); +#endif /* _M_IX86 */ } #endif |
