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 --- chart2/source/tools/StatisticsHelper.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'chart2/source/tools/StatisticsHelper.cxx') diff --git a/chart2/source/tools/StatisticsHelper.cxx b/chart2/source/tools/StatisticsHelper.cxx index 7613a071d3e4..7bffdd7812fd 100644 --- a/chart2/source/tools/StatisticsHelper.cxx +++ b/chart2/source/tools/StatisticsHelper.cxx @@ -301,7 +301,7 @@ Reference< beans::XPropertySet > StatisticsHelper::addErrorBars( return xErrorBar; const OUString aPropName( - (bYError) ? OUString(CHART_UNONAME_ERRORBAR_Y) : OUString(CHART_UNONAME_ERRORBAR_X)); + bYError ? OUString(CHART_UNONAME_ERRORBAR_Y) : OUString(CHART_UNONAME_ERRORBAR_X)); if( !( xSeriesProp->getPropertyValue( aPropName ) >>= xErrorBar ) || !xErrorBar.is()) { @@ -326,7 +326,7 @@ Reference< beans::XPropertySet > StatisticsHelper::getErrorBars( Reference< beans::XPropertySet > xSeriesProp( xDataSeries, uno::UNO_QUERY ); Reference< beans::XPropertySet > xErrorBar; const OUString aPropName( - (bYError) ? OUString(CHART_UNONAME_ERRORBAR_Y) : OUString(CHART_UNONAME_ERRORBAR_X)); + bYError ? OUString(CHART_UNONAME_ERRORBAR_Y) : OUString(CHART_UNONAME_ERRORBAR_X)); if ( xSeriesProp.is()) xSeriesProp->getPropertyValue( aPropName ) >>= xErrorBar; -- cgit