From edc85fb55f8adc30a1416c6c854c89097060fb21 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 23 Oct 2018 07:54:15 +0200 Subject: clang-tidy performance-unnecessary-copy-init in idl..reportdesign Change-Id: I4b2eda375bbfe1ba35a45168515d885935adcb76 Reviewed-on: https://gerrit.libreoffice.org/62217 Tested-by: Jenkins Reviewed-by: Noel Grandin --- linguistic/source/convdicxml.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'linguistic') diff --git a/linguistic/source/convdicxml.cxx b/linguistic/source/convdicxml.cxx index 0ee4844c1b38..55b1f40b5dd0 100644 --- a/linguistic/source/convdicxml.cxx +++ b/linguistic/source/convdicxml.cxx @@ -329,9 +329,8 @@ void ConvDicXMLExport::ExportContent_() for (auto const& elem : rDic.aFromLeft) aKeySet.insert( elem.first ); - for (auto const& elem : aKeySet) + for (const OUString& aLeftText : aKeySet) { - OUString aLeftText(elem); AddAttribute( XML_NAMESPACE_TCD, "left-text", aLeftText ); if (rDic.pConvPropType) // property-type list available? { @@ -348,10 +347,10 @@ void ConvDicXMLExport::ExportContent_() "entry" , true, true ); pair< ConvMap::iterator, ConvMap::iterator > aRange = - rDic.aFromLeft.equal_range(elem); + rDic.aFromLeft.equal_range(aLeftText); for (auto aIt = aRange.first; aIt != aRange.second; ++aIt) { - DBG_ASSERT( elem == (*aIt).first, "key <-> entry mismatch" ); + DBG_ASSERT( aLeftText == (*aIt).first, "key <-> entry mismatch" ); OUString aRightText( (*aIt).second ); SvXMLElementExport aEntryRightText( *this, XML_NAMESPACE_TCD, "right-text" , true, false ); -- cgit