diff options
author | Yuchen Deng <loaden@gmail.com> | 2013-10-20 14:54:25 +0800 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-21 15:18:15 +0200 |
commit | a3f01331263eddbc502fb88734568ac38df5e316 (patch) | |
tree | 944ad06a768a652f1e869e558abe999e55c39288 /src/3rdparty/masm/wtf | |
parent | 8a6fadb39aec58f373ef24f39d39f7fbc050277d (diff) |
Fix MSVC2013 compilation
Change-Id: I79b50e786f46c9a15963f09158c18871c95fe093
Reviewed-by: Peter Kümmel <syntheticpp@gmx.net>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/3rdparty/masm/wtf')
-rw-r--r-- | src/3rdparty/masm/wtf/MathExtras.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/3rdparty/masm/wtf/MathExtras.h b/src/3rdparty/masm/wtf/MathExtras.h index b08ee678e7..600a9c7148 100644 --- a/src/3rdparty/masm/wtf/MathExtras.h +++ b/src/3rdparty/masm/wtf/MathExtras.h @@ -123,6 +123,7 @@ inline bool signbit(double x) { struct ieee_double *p = (struct ieee_double *)&x #if COMPILER(MSVC) +#if _MSC_VER < 1800 // We must not do 'num + 0.5' or 'num - 0.5' because they can cause precision loss. static double round(double num) { @@ -138,6 +139,7 @@ static float roundf(float num) return integer - num > 0.5f ? integer - 1.0f : integer; return integer - num >= 0.5f ? integer - 1.0f : integer; } +#endif inline long long llround(double num) { return static_cast<long long>(round(num)); } inline long long llroundf(float num) { return static_cast<long long>(roundf(num)); } inline long lround(double num) { return static_cast<long>(round(num)); } |