summaryrefslogtreecommitdiff
path: root/codemaker
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-08 16:55:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-11 08:40:57 +0200
commit4c09f8e087cae598efbb78759110c03ed10e3a3a (patch)
tree963bf5ef462eacc2195ffb23d22c6e7e5fd0d627 /codemaker
parent58edb05341494dfaa3d3ce33505b97961d5f2ea9 (diff)
clang-tidy modernize-use-emplace in c*
Change-Id: I419d1f67ba301050d05981db2a3d6178878684a9 Reviewed-on: https://gerrit.libreoffice.org/42110 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'codemaker')
-rw-r--r--codemaker/source/cppumaker/cppuoptions.cxx4
-rw-r--r--codemaker/source/javamaker/javaoptions.cxx4
-rw-r--r--codemaker/source/javamaker/javatype.cxx17
3 files changed, 11 insertions, 14 deletions
diff --git a/codemaker/source/cppumaker/cppuoptions.cxx b/codemaker/source/cppumaker/cppuoptions.cxx
index b399de19147e..af644af1538f 100644
--- a/codemaker/source/cppumaker/cppuoptions.cxx
+++ b/codemaker/source/cppumaker/cppuoptions.cxx
@@ -246,7 +246,7 @@ bool CppuOptions::initOptions(int ac, char* av[], bool bCmdFile)
s = av[i] + 2;
}
- m_extra_input_files.push_back( s );
+ m_extra_input_files.emplace_back(s );
break;
}
@@ -286,7 +286,7 @@ bool CppuOptions::initOptions(int ac, char* av[], bool bCmdFile)
}
else
{
- m_inputFiles.push_back(av[i]);
+ m_inputFiles.emplace_back(av[i]);
}
}
}
diff --git a/codemaker/source/javamaker/javaoptions.cxx b/codemaker/source/javamaker/javaoptions.cxx
index 08c5a7f4dbf8..19818f8143be 100644
--- a/codemaker/source/javamaker/javaoptions.cxx
+++ b/codemaker/source/javamaker/javaoptions.cxx
@@ -177,7 +177,7 @@ bool JavaOptions::initOptions(int ac, char* av[], bool bCmdFile)
s = av[i] + 2;
}
- m_extra_input_files.push_back( s );
+ m_extra_input_files.emplace_back(s );
break;
}
@@ -215,7 +215,7 @@ bool JavaOptions::initOptions(int ac, char* av[], bool bCmdFile)
}
} else
{
- m_inputFiles.push_back(av[i]);
+ m_inputFiles.emplace_back(av[i]);
}
}
}
diff --git a/codemaker/source/javamaker/javatype.cxx b/codemaker/source/javamaker/javatype.cxx
index f2ce8454ef26..8ca5b7190ca2 100644
--- a/codemaker/source/javamaker/javatype.cxx
+++ b/codemaker/source/javamaker/javatype.cxx
@@ -786,7 +786,7 @@ void handleEnumType(
std::unique_ptr< ClassFile::Code > blockCode(cf->newCode());
blockCode->instrGetstatic(className, pair.second, classDescriptor);
blockCode->instrAreturn();
- blocks.push_back(std::make_pair(pair.first, blockCode.get()));
+ blocks.emplace_back(pair.first, blockCode.get());
blockCode.release();
}
code->instrLookupswitch(defCode.get(), blocks);
@@ -1908,13 +1908,12 @@ void handleInterfaceType(
"set" + attrName, sdesc.getDescriptor(), nullptr, exc2,
sdesc.getSignature());
}
- typeInfo.push_back(
- TypeInfo(
+ typeInfo.emplace_back(
TypeInfo::KIND_ATTRIBUTE, attrName, specialType,
static_cast< TypeInfo::Flags >(
(attr.readOnly ? TypeInfo::FLAG_READONLY : 0)
| (attr.bound ? TypeInfo::FLAG_BOUND : 0)),
- index, polymorphicUnoType));
+ index, polymorphicUnoType);
index += (attr.readOnly ? 1 : 2);
}
for (const unoidl::InterfaceTypeEntity::Method& method : entity->getDirectMethods())
@@ -1925,11 +1924,10 @@ void handleInterfaceType(
MethodDescriptor desc(
manager, dependencies, method.returnType, &specialReturnType,
&polymorphicUnoReturnType);
- typeInfo.push_back(
- TypeInfo(
+ typeInfo.emplace_back(
TypeInfo::KIND_METHOD, methodName, specialReturnType,
static_cast< TypeInfo::Flags >(0), index++,
- polymorphicUnoReturnType));
+ polymorphicUnoReturnType);
sal_Int32 paramIndex = 0;
for (const unoidl::InterfaceTypeEntity::Method::Parameter& param : method.parameters)
{
@@ -1943,10 +1941,9 @@ void handleInterfaceType(
if (out || isSpecialType(specialType)
|| polymorphicUnoType.kind != PolymorphicUnoType::KIND_NONE)
{
- typeInfo.push_back(
- TypeInfo(
+ typeInfo.emplace_back(
codemaker::convertString(param.name), specialType, in,
- out, methodName, paramIndex, polymorphicUnoType));
+ out, methodName, paramIndex, polymorphicUnoType);
}
++paramIndex;
}