Fix -Wparentheses warning with GCC 5 in SaturatedArithmetic.h
authormcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Apr 2015 01:29:59 +0000 (01:29 +0000)
committermcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Apr 2015 01:29:59 +0000 (01:29 +0000)
commit1d12763a630640619f8a77f54f1005ae8fc4db8b
tree9473dacbd051d53821c192e7a8eacabb9843281b
parent4f5320a43a0dd3a8d1ee3ef0ca3f07ee95a89bba
Fix -Wparentheses warning with GCC 5 in SaturatedArithmetic.h
https://bugs.webkit.org/show_bug.cgi?id=143457

Reviewed by Benjamin Poulain.

Tested by WTF.SaturatedArithmeticAddition and WTF.SaturatedArithmeticSubtraction.

* wtf/SaturatedArithmetic.h:
(signedAddOverflows): Use && instead of & to avoid triggering -Wparentheses in newer
versions of GCC and Clang, and to improve the clarity of the function.
(signedSubtractOverflows): Changed correspondingly, although there was no warning here.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WTF/ChangeLog
Source/WTF/wtf/SaturatedArithmetic.h