[Libreoffice-commits] core.git: binaryurp/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Mon May 17 08:39:45 UTC 2021
binaryurp/source/unmarshal.cxx | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit d8d15656817a58a5e9c6a6ebc88038ba4e5ef865
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Sun May 16 13:17:22 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon May 17 10:39:05 2021 +0200
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 at collabora.co.uk>
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])));
More information about the Libreoffice-commits
mailing list