From 80f990b8e3d05e47e041685a7811f1352d03ad4d Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 4 Sep 2018 18:03:28 +0200 Subject: clang-tidy performance-inefficient-vector-operation Change-Id: Iebcaea7b08c5284946d83b6b6b9ed26b218025d4 Reviewed-on: https://gerrit.libreoffice.org/59992 Tested-by: Jenkins Reviewed-by: Noel Grandin --- configmgr/source/access.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'configmgr/source') diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx index 80ca2af1c9ce..26c8e7e5c516 100644 --- a/configmgr/source/access.cxx +++ b/configmgr/source/access.cxx @@ -413,6 +413,7 @@ css::uno::Sequence< OUString > Access::getElementNames() checkLocalizedPropertyAccess(); std::vector< rtl::Reference< ChildAccess > > children(getAllChildren()); std::vector names; + names.reserve(children.size()); for (auto const& child : children) { names.push_back(child->getNameInternal()); @@ -539,6 +540,7 @@ css::uno::Sequence< css::beans::Property > Access::getProperties() osl::MutexGuard g(*lock_); std::vector< rtl::Reference< ChildAccess > > children(getAllChildren()); std::vector< css::beans::Property > properties; + properties.reserve(children.size()); for (auto const& child : children) { properties.push_back(child->asProperty()); -- cgit