summaryrefslogtreecommitdiff
path: root/binaryurp/source/unmarshal.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-05-16 13:17:22 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-17 10:39:05 +0200
commitd8d15656817a58a5e9c6a6ebc88038ba4e5ef865 (patch)
tree9b347c5f9fb1e58cdca0bd9a16a44a8b8ae605ff /binaryurp/source/unmarshal.cxx
parentcfb9fb3c8ab861e53306f1a2362784446abe903a (diff)
small perf improvement in readMemberValues
Change-Id: I5d5973401a87b69dd54721d16ed19e227a6c2ac6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115674 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'binaryurp/source/unmarshal.cxx')
-rw-r--r--binaryurp/source/unmarshal.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/binaryurp/source/unmarshal.cxx b/binaryurp/source/unmarshal.cxx
index d307c81cc0b5..4263edf8c91c 100644
--- a/binaryurp/source/unmarshal.cxx
+++ b/binaryurp/source/unmarshal.cxx
@@ -437,6 +437,7 @@ BinaryAny Unmarshal::readSequence(css::uno::TypeDescription const & type) {
return BinaryAny(type, &p);
}
std::vector< BinaryAny > as;
+ as.reserve(n);
for (sal_uInt32 i = 0; i != n; ++i) {
as.push_back(readValue(ctd));
}
@@ -477,6 +478,7 @@ void Unmarshal::readMemberValues(
css::uno::TypeDescription(&ctd->pBaseTypeDescription->aBase),
values);
}
+ values->reserve(values->size() + ctd->nMembers);
for (sal_Int32 i = 0; i != ctd->nMembers; ++i) {
values->push_back(
readValue(css::uno::TypeDescription(ctd->ppTypeRefs[i])));