writerfilter/source/ooxml/OOXMLPropertySet.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
New commits: commit 0e1e33f053c235dd8b63c60f68280f9cf9571281 Author: Mike Kaganski <[email protected]> Date: Tue Jul 25 11:58:57 2017 +0200 OOXMLPropertySet::add: resize->reserve + range-based loop Change-Id: I22fd6893137fcc8815fa222fdfa59f7076887399 Reviewed-on: https://gerrit.libreoffice.org/40393 Tested-by: Jenkins <[email protected]> Reviewed-by: Mike Kaganski <[email protected]> diff --git a/writerfilter/source/ooxml/OOXMLPropertySet.cxx b/writerfilter/source/ooxml/OOXMLPropertySet.cxx index da8a3dd1bf23..118850144686 100644 --- a/writerfilter/source/ooxml/OOXMLPropertySet.cxx +++ b/writerfilter/source/ooxml/OOXMLPropertySet.cxx @@ -399,10 +399,9 @@ void OOXMLPropertySet::add(const OOXMLPropertySet::Pointer_t& pPropertySet) if (pSet != nullptr) { - mProperties.resize(mProperties.size() + pSet->mProperties.size()); - for (OOXMLProperties_t::iterator aIt = pSet->mProperties.begin(); - aIt != pSet->mProperties.end(); ++aIt) - add(*aIt); + mProperties.reserve(mProperties.size() + pSet->mProperties.size()); + for (const auto& aIt: pSet->mProperties) + add(aIt); } } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
