summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-09-04 18:03:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-09-05 09:28:27 +0200
commit80f990b8e3d05e47e041685a7811f1352d03ad4d (patch)
tree2b2c045c75544767499aea0d2b18e1890e9b9566 /sfx2
parentc2139cafe6240991f88b85c1df12613d0ae0e821 (diff)
clang-tidy performance-inefficient-vector-operation
Change-Id: Iebcaea7b08c5284946d83b6b6b9ed26b218025d4 Reviewed-on: https://gerrit.libreoffice.org/59992 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/SfxDocumentMetaData.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx
index 78dfda2cd53a..7fb8ffe696bb 100644
--- a/sfx2/source/doc/SfxDocumentMetaData.cxx
+++ b/sfx2/source/doc/SfxDocumentMetaData.cxx
@@ -1138,7 +1138,9 @@ void SfxDocumentMetaData::init(
css::uno::Reference<css::xml::dom::XNodeList> nodes =
xPath->selectNodeList(m_xParent, "child::" + name);
std::vector<css::uno::Reference<css::xml::dom::XNode> > v;
- for (sal_Int32 i = 0; i < nodes->getLength(); ++i) {
+ v.reserve(nodes->getLength());
+ for (sal_Int32 i = 0; i < nodes->getLength(); ++i)
+ {
v.push_back(nodes->item(i));
}
m_metaList[name] = v;