From 7ca4ea54b4d610104df1b88ae5b04c2081a4a429 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 11 Sep 2017 11:29:40 +0200 Subject: clang-tidy modernize-use-emplace in hwpfilter..lotuswordpro Change-Id: Ic11634ca28396fd156390c511087bae03bd5fb70 Reviewed-on: https://gerrit.libreoffice.org/42156 Tested-by: Jenkins Reviewed-by: Noel Grandin --- idlc/source/astinterface.cxx | 3 +-- idlc/source/idlccompile.cxx | 8 ++++---- idlc/source/options.cxx | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) (limited to 'idlc') diff --git a/idlc/source/astinterface.cxx b/idlc/source/astinterface.cxx index 8fc4ed0f992c..e8dd63b12b1c 100644 --- a/idlc/source/astinterface.cxx +++ b/idlc/source/astinterface.cxx @@ -58,8 +58,7 @@ AstInterface::DoubleDeclarations AstInterface::checkInheritedInterfaceClashes( void AstInterface::addInheritedInterface( AstType const * ifc, bool optional, OUString const & documentation) { - m_inheritedInterfaces.push_back( - InheritedInterface(ifc, optional, documentation)); + m_inheritedInterfaces.emplace_back(ifc, optional, documentation); if (!optional) { ++m_mandatoryInterfaces; } diff --git a/idlc/source/idlccompile.cxx b/idlc/source/idlccompile.cxx index 03b9a517f9e3..9c53e634300e 100644 --- a/idlc/source/idlccompile.cxx +++ b/idlc/source/idlccompile.cxx @@ -236,9 +236,9 @@ sal_Int32 compileFile(const OString * pathname) idlc()->setRealFileName(tmpFile); ::std::vector< OUString> lCppArgs; - lCppArgs.push_back("-DIDL"); - lCppArgs.push_back("-C"); - lCppArgs.push_back("-zI"); + lCppArgs.emplace_back("-DIDL"); + lCppArgs.emplace_back("-C"); + lCppArgs.emplace_back("-zI"); OStringBuffer cppArgs(256); Options* pOptions = idlc()->getOptions(); @@ -284,7 +284,7 @@ sal_Int32 compileFile(const OString * pathname) } while( nIndex != -1 ); } - lCppArgs.push_back(OUString("-o")); + lCppArgs.emplace_back("-o"); cppArgs.append(preprocFile); lCppArgs.push_back(OStringToOUString(cppArgs.makeStringAndClear(), RTL_TEXTENCODING_UTF8)); diff --git a/idlc/source/options.cxx b/idlc/source/options.cxx index be907232ca1b..b183c2bf6889 100644 --- a/idlc/source/options.cxx +++ b/idlc/source/options.cxx @@ -101,14 +101,14 @@ bool Options::checkArgument (std::vector< std::string > & rArgs, char const * ar } default: // "-