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>
This commit is contained in:
parent
cfb9fb3c8a
commit
d8d1565681
1 changed files with 2 additions and 0 deletions
|
@ -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])));
|
||||
|
|
Loading…
Reference in a new issue