From da9fe0da11687bfc4c0eff2197286da67d6206c2 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Wed, 2 Jun 2021 21:23:42 +0200 Subject: Initialize vector directly with the already known count number instead of initializing an empty vector then reserve a fixed value Change-Id: Iccddda05b3dd98aa9c25a61637ece7af4d42d72f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116624 Tested-by: Jenkins Reviewed-by: Julien Nabet --- extensions/source/propctrlr/formlinkdialog.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'extensions') diff --git a/extensions/source/propctrlr/formlinkdialog.cxx b/extensions/source/propctrlr/formlinkdialog.cxx index 7f2d794b4010..f367179b7a1c 100644 --- a/extensions/source/propctrlr/formlinkdialog.cxx +++ b/extensions/source/propctrlr/formlinkdialog.cxx @@ -185,8 +185,8 @@ namespace pcr void FormLinkDialog::commitLinkPairs() { // collect the field lists from the rows - std::vector< OUString > aDetailFields; aDetailFields.reserve( 4 ); - std::vector< OUString > aMasterFields; aMasterFields.reserve( 4 ); + std::vector< OUString > aDetailFields(4); + std::vector< OUString > aMasterFields(4); const FieldLinkRow* aRows[] = { m_xRow1.get(), m_xRow2.get(), m_xRow3.get(), m_xRow4.get() -- cgit