summaryrefslogtreecommitdiff
path: root/cui
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 /cui
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 'cui')
-rw-r--r--cui/source/options/optjava.cxx1
-rw-r--r--cui/source/tabpages/labdlg.cxx3
2 files changed, 3 insertions, 1 deletions
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 6c72fb818e5e..f115faedc701 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -821,6 +821,7 @@ std::vector< OUString > SvxJavaParameterDlg::GetParameters() const
{
int nCount = m_xAssignedList->n_children();
std::vector< OUString > aParamList;
+ aParamList.reserve(nCount);
for (int i = 0; i < nCount; ++i)
aParamList.push_back(m_xAssignedList->get_text(i));
return aParamList;
diff --git a/cui/source/tabpages/labdlg.cxx b/cui/source/tabpages/labdlg.cxx
index 78957dc927bf..ef2fff811e8c 100644
--- a/cui/source/tabpages/labdlg.cxx
+++ b/cui/source/tabpages/labdlg.cxx
@@ -105,7 +105,8 @@ SvxCaptionTabPage::SvxCaptionTabPage(vcl::Window* pParent, const SfxItemSet& rIn
ListBox *pLineTypes = get<ListBox>("linetypes");
assert(pLineTypes->GetEntryCount() == 3);
std::vector<OUString> aLineTypes;
- for (int i = 0; i < 3; ++i)
+ aLineTypes.reserve(3);
+ for (int i = 0; i < 3; ++i)
aLineTypes.push_back(pLineTypes->GetEntry(i));
get(m_pFT_LENGTHFT, "lengthft");