Title: [165453] trunk/Source/WTF
Revision
165453
Author
[email protected]
Date
2014-03-11 14:51:42 -0700 (Tue, 11 Mar 2014)

Log Message

[Win] Unreviewed gardening.

* wtf/MathExtras.h: VS2013 provides an lrint implementation. No need to implement
our own.

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (165452 => 165453)


--- trunk/Source/WTF/ChangeLog	2014-03-11 15:09:12 UTC (rev 165452)
+++ trunk/Source/WTF/ChangeLog	2014-03-11 21:51:42 UTC (rev 165453)
@@ -1,3 +1,10 @@
+2014-03-11  Brent Fulgham  <[email protected]>
+
+        [Win] Unreviewed gardening.
+
+        * wtf/MathExtras.h: VS2013 provides an lrint implementation. No need to implement
+        our own.
+
 2014-03-10  Jer Noble  <[email protected]>
 
         Improve WeakPtr operators.

Modified: trunk/Source/WTF/wtf/MathExtras.h (165452 => 165453)


--- trunk/Source/WTF/wtf/MathExtras.h	2014-03-11 15:09:12 UTC (rev 165452)
+++ trunk/Source/WTF/wtf/MathExtras.h	2014-03-11 21:51:42 UTC (rev 165453)
@@ -144,28 +144,6 @@
 #define fmod(x, y) wtf_fmod(x, y)
 #define pow(x, y) wtf_pow(x, y)
 
-// MSVC's math functions do not bring lrint.
-inline long int lrint(double flt)
-{
-    int64_t intgr;
-#if CPU(X86)
-    __asm {
-        fld flt
-        fistp intgr
-    };
-#else
-    ASSERT(std::isfinite(flt));
-    double rounded = round(flt);
-    intgr = static_cast<int64_t>(rounded);
-    // If the fractional part is exactly 0.5, we need to check whether
-    // the rounded result is even. If it is not we need to add 1 to
-    // negative values and subtract one from positive values.
-    if ((fabs(intgr - flt) == 0.5) & intgr)
-        intgr -= ((intgr >> 62) | 1); // 1 with the sign of result, i.e. -1 or 1.
-#endif
-    return static_cast<long int>(intgr);
-}
-
 #endif // COMPILER(MSVC)
 
 inline double deg2rad(double d)  { return d * piDouble / 180.0; }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to