Title: [177736] trunk/Source/WTF
- Revision
- 177736
- Author
- [email protected]
- Date
- 2014-12-25 10:48:41 -0800 (Thu, 25 Dec 2014)
Log Message
Simplify saturated integer add/sub
https://bugs.webkit.org/show_bug.cgi?id=139854
Address Darin's post-commit feedback to fix API tests.
* wtf/SaturatedArithmetic.h: (saturatedSubtraction):
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (177735 => 177736)
--- trunk/Source/WTF/ChangeLog 2014-12-25 16:23:47 UTC (rev 177735)
+++ trunk/Source/WTF/ChangeLog 2014-12-25 18:48:41 UTC (rev 177736)
@@ -1,3 +1,12 @@
+2014-12-25 Alexey Proskuryakov <[email protected]>
+
+ Simplify saturated integer add/sub
+ https://bugs.webkit.org/show_bug.cgi?id=139854
+
+ Address Darin's post-commit feedback to fix API tests.
+
+ * wtf/SaturatedArithmetic.h: (saturatedSubtraction):
+
2014-12-24 Benjamin Poulain <[email protected]>
Simplify saturated integer add/sub
Modified: trunk/Source/WTF/wtf/SaturatedArithmetic.h (177735 => 177736)
--- trunk/Source/WTF/wtf/SaturatedArithmetic.h 2014-12-25 16:23:47 UTC (rev 177735)
+++ trunk/Source/WTF/wtf/SaturatedArithmetic.h 2014-12-25 18:48:41 UTC (rev 177736)
@@ -96,7 +96,7 @@
);
#else
if (signedSubtractOverflows(a, b, result))
- result = std::numeric_limits<uint32_t>::max() + (static_cast<uint32_t>(a) >> 31);
+ result = std::numeric_limits<int32_t>::max() + (static_cast<uint32_t>(a) >> 31);
#endif
return result;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes