summaryrefslogtreecommitdiffstats
path: root/desktop
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 /desktop
parentloplugin:simplifyconstruct in accessibility..bridges (diff)
downloadcore-80f990b8e3d05e47e041685a7811f1352d03ad4d.tar.gz
core-80f990b8e3d05e47e041685a7811f1352d03ad4d.zip
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 'desktop')
-rw-r--r--desktop/source/app/cmdlineargs.cxx1
-rw-r--r--desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx4
2 files changed, 3 insertions, 2 deletions
diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx
index a1377168abf8..0745116b07ac 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -63,6 +63,7 @@ std::vector< OUString > translateExternalUris(
std::vector< OUString > const & input)
{
std::vector< OUString > t;
+ t.reserve(input.size());
for (auto const& elem : input)
{
t.push_back(translateExternalUris(elem));
diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
index 8ceaf58f3a31..c690ae401b2a 100644
--- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
@@ -369,8 +369,8 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
else if (request >>= depExc)
{
std::vector< OUString > deps;
- for (sal_Int32 i = 0; i < depExc.UnsatisfiedDependencies.getLength();
- ++i)
+ deps.reserve(depExc.UnsatisfiedDependencies.getLength());
+ for (sal_Int32 i = 0; i < depExc.UnsatisfiedDependencies.getLength(); ++i)
{
deps.push_back(
dp_misc::Dependencies::getErrorText( depExc.UnsatisfiedDependencies[i]) );