From 7cc1d3437a48140382773bf41401a46a3ced4706 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 3 May 2021 09:29:37 +0200 Subject: loplugin:unnecessaryparen small improvement when calling a function, and passing only one arg, but the function has defaulted args, we were ignoring this case. Change-Id: I86517f18e30531127664088ddc09ef96dbd8bdf5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115033 Tested-by: Jenkins Reviewed-by: Noel Grandin --- xmloff/source/chart/SchXMLExport.cxx | 4 ++-- xmloff/source/style/impastpl.cxx | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'xmloff') diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index 87bfb050164a..af5885d3e354 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -3595,7 +3595,7 @@ void SchXMLExportHelper_Impl::exportDataPoints( if( aLastPoint.mnRepeat > 1 ) mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_REPEATED, - OUString::number( ( aLastPoint.mnRepeat ) )); + OUString::number( aLastPoint.mnRepeat )); for (auto& deletedLegendEntry : deletedLegendEntriesSeq) { @@ -3621,7 +3621,7 @@ void SchXMLExportHelper_Impl::exportDataPoints( if( aLastPoint.mnRepeat > 1 ) mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_REPEATED, - OUString::number( ( aLastPoint.mnRepeat ) )); + OUString::number( aLastPoint.mnRepeat )); for (auto& deletedLegendEntry : deletedLegendEntriesSeq) { diff --git a/xmloff/source/style/impastpl.cxx b/xmloff/source/style/impastpl.cxx index 34dc16a32cc0..0a3e2e97595f 100644 --- a/xmloff/source/style/impastpl.cxx +++ b/xmloff/source/style/impastpl.cxx @@ -103,15 +103,15 @@ data2string(void *data, case typelib_TypeClass_BOOLEAN: return *static_cast(data) ? OUString("true") : OUString("false"); case typelib_TypeClass_BYTE: - return OUString::number((*static_cast(data))); + return OUString::number(*static_cast(data)); case typelib_TypeClass_SHORT: - return OUString::number((*static_cast(data))); + return OUString::number(*static_cast(data)); case typelib_TypeClass_LONG: - return OUString::number((*static_cast(data))); + return OUString::number(*static_cast(data)); case typelib_TypeClass_HYPER: - return OUString::number((*static_cast(data))); + return OUString::number(*static_cast(data)); case typelib_TypeClass_UNSIGNED_SHORT: - return OUString::number((*static_cast(data))); + return OUString::number(*static_cast(data)); case typelib_TypeClass_UNSIGNED_LONG: return OUString::number((*static_cast(data)), 16); case typelib_TypeClass_UNSIGNED_HYPER: @@ -121,7 +121,7 @@ data2string(void *data, case typelib_TypeClass_DOUBLE: return OUString::number(*static_cast(data)); case typelib_TypeClass_CHAR: - return ("U+" + OUString::number((*static_cast(data)))); + return ("U+" + OUString::number(*static_cast(data))); case typelib_TypeClass_STRING: return *static_cast(data); case typelib_TypeClass_TYPE: @@ -132,7 +132,7 @@ data2string(void *data, case typelib_TypeClass_STRUCT: return struct2string(data, type->pType); case typelib_TypeClass_ENUM: - return OUString::number((*static_cast(data))); + return OUString::number(*static_cast(data)); default: assert(false); // this cannot happen I hope break; -- cgit v1.2.3