From 4250b25c6ae361359300ab6ccde27230f8e01039 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 6 Jul 2017 14:49:15 +0200 Subject: teach unnecessaryparen loplugin about identifiers Change-Id: I5710b51e53779c222cec0bf08cd34bda330fec4b Reviewed-on: https://gerrit.libreoffice.org/39737 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- include/comphelper/newarray.hxx | 2 +- include/cppcanvas/color.hxx | 4 ++-- include/unotools/charclass.hxx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/comphelper/newarray.hxx b/include/comphelper/newarray.hxx index a28bff7477cb..a904f7d1ed0d 100644 --- a/include/comphelper/newarray.hxx +++ b/include/comphelper/newarray.hxx @@ -29,7 +29,7 @@ namespace comphelper { template T * newArray_null(size_t const n) throw() { - if (((::std::numeric_limits::max)() / sizeof(T)) <= n) { + if ((::std::numeric_limits::max() / sizeof(T)) <= n) { return 0; } return new (::std::nothrow) T[n]; diff --git a/include/cppcanvas/color.hxx b/include/cppcanvas/color.hxx index 678e431d0846..0a5477cfa995 100644 --- a/include/cppcanvas/color.hxx +++ b/include/cppcanvas/color.hxx @@ -66,12 +66,12 @@ namespace cppcanvas inline Color::IntSRGBA makeColor( sal_uInt8 nRed, sal_uInt8 nGreen, sal_uInt8 nBlue, sal_uInt8 nAlpha ) { - return (nRed << 24U)|(nGreen << 16U)|(nBlue << 8U)|(nAlpha); + return (nRed << 24U)|(nGreen << 16U)|(nBlue << 8U)|nAlpha; } inline sal_Int32 makeColorARGB( sal_uInt8 nAlpha, sal_uInt8 nRed, sal_uInt8 nGreen, sal_uInt8 nBlue) { - return (nAlpha << 24U)|(nRed << 16U)|(nGreen << 8U)|(nBlue); + return (nAlpha << 24U)|(nRed << 16U)|(nGreen << 8U)|nBlue; } } diff --git a/include/unotools/charclass.hxx b/include/unotools/charclass.hxx index 20f9857d0ac0..bfcf05514fd7 100644 --- a/include/unotools/charclass.hxx +++ b/include/unotools/charclass.hxx @@ -101,7 +101,7 @@ public: static bool isNumericType( sal_Int32 nType ) { return ((nType & nCharClassNumericType) != 0) && - ((nType & ~(nCharClassNumericTypeMask)) == 0); + ((nType & ~nCharClassNumericTypeMask) == 0); } /// whether type is pure alphanumeric or not, e.g. return of getStringType @@ -117,7 +117,7 @@ public: static bool isLetterType( sal_Int32 nType ) { return ((nType & nCharClassLetterType) != 0) && - ((nType & ~(nCharClassLetterTypeMask)) == 0); + ((nType & ~nCharClassLetterTypeMask) == 0); } /// whether type is pure letternumeric or not, e.g. return of getStringType -- cgit