From 65e293f524437a548b6c099bbe6099b56957063c Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 11 Sep 2017 16:43:19 +0200 Subject: clang-tidy modernize-use-emplace in package..sax Change-Id: Ibc0258fd79df987a0e295552bcc5bf89ee12007a Reviewed-on: https://gerrit.libreoffice.org/42173 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sax/qa/cppunit/xmlimport.cxx | 4 ++-- sax/source/tools/fastattribs.cxx | 4 ++-- sax/source/tools/fshelper.cxx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'sax') diff --git a/sax/qa/cppunit/xmlimport.cxx b/sax/qa/cppunit/xmlimport.cxx index 543de556b8e8..efaab5fabbc6 100644 --- a/sax/qa/cppunit/xmlimport.cxx +++ b/sax/qa/cppunit/xmlimport.cxx @@ -105,9 +105,9 @@ OUString TestDocumentHandler::canonicalform(const OUString &sName, const OUStrin { m_aCountStack.top() += 1; if ( nIndex < 0 ) - m_aNamespaceStack.push_back( make_pair( OUString( "default" ), sValue ) ); + m_aNamespaceStack.emplace_back( OUString( "default" ), sValue ); else - m_aNamespaceStack.push_back( make_pair( sName.copy( nIndex + 1 ), sValue ) ); + m_aNamespaceStack.emplace_back( sName.copy( nIndex + 1 ), sValue ); } else { diff --git a/sax/source/tools/fastattribs.cxx b/sax/source/tools/fastattribs.cxx index 314f156e8dfe..2416a3bb42c7 100644 --- a/sax/source/tools/fastattribs.cxx +++ b/sax/source/tools/fastattribs.cxx @@ -110,12 +110,12 @@ void FastAttributeList::addNS( sal_Int32 nNamespaceToken, sal_Int32 nToken, cons void FastAttributeList::addUnknown( const OUString& rNamespaceURL, const OString& rName, const OString& value ) { - maUnknownAttributes.push_back( UnknownAttribute( rNamespaceURL, rName, value ) ); + maUnknownAttributes.emplace_back( rNamespaceURL, rName, value ); } void FastAttributeList::addUnknown( const OString& rName, const OString& value ) { - maUnknownAttributes.push_back( UnknownAttribute( rName, value ) ); + maUnknownAttributes.emplace_back( rName, value ); } // XFastAttributeList diff --git a/sax/source/tools/fshelper.cxx b/sax/source/tools/fshelper.cxx index 1229a8689c29..3875f54df6ca 100644 --- a/sax/source/tools/fshelper.cxx +++ b/sax/source/tools/fshelper.cxx @@ -46,11 +46,11 @@ void FastSerializerHelper::startElement(sal_Int32 elementTokenId, FSEND_t) } void FastSerializerHelper::pushAttributeValue(sal_Int32 attribute, const char* value) { - mpSerializer->getTokenValueList().push_back(TokenValue(attribute, value)); + mpSerializer->getTokenValueList().emplace_back(attribute, value); } void FastSerializerHelper::pushAttributeValue(sal_Int32 attribute, const OString& value) { - mpSerializer->getTokenValueList().push_back(TokenValue(attribute, value.getStr())); + mpSerializer->getTokenValueList().emplace_back(attribute, value.getStr()); } void FastSerializerHelper::singleElement(sal_Int32 elementTokenId, FSEND_t) { -- cgit