From 72ef2b5d9802c424dbb0810e0a72fae50d92b678 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 22 Nov 2017 14:12:34 +0100 Subject: Make loplugin:unnecessaryparen warn about (x) ? ... : ... after all ...which had been left out because "lots of our code uses this style, which I'm loathe to bulk-fix as yet", but now in "use std::unique_ptr" would have caused an otherwise innocent-looking code change to trigger a loplugin:unnecessaryparen warning for pFormat = (pGrfObj) ? ... (barring a change to ignoreAllImplicit in compilerplugins/clang/unnecessaryparen.cxx similar to that in "Make not warning about !! in loplugin:simplifybool consistent", which should also have caused the warning to disappear for the modified code, IIUC). Change-Id: I8bff0cc11bbb839ef06d07b8d9237f150804fec2 Reviewed-on: https://gerrit.libreoffice.org/45088 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- comphelper/source/misc/string.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'comphelper/source') diff --git a/comphelper/source/misc/string.cxx b/comphelper/source/misc/string.cxx index be1f49b7236c..b72c6da3eea2 100644 --- a/comphelper/source/misc/string.cxx +++ b/comphelper/source/misc/string.cxx @@ -453,7 +453,7 @@ OUString removeAny(OUString const& rIn, buf.append(c); } } - return (isFound) ? buf.makeStringAndClear() : rIn; + return isFound ? buf.makeStringAndClear() : rIn; } OUString setToken(const OUString& rIn, sal_Int32 nToken, sal_Unicode cTok, -- cgit