summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-10-14 14:57:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-10-14 21:28:40 +0200
commit1f9468fc29874eae5100317282ab8b395904406d (patch)
tree7da605653b3a979d18c2283f42ac8a3efd9eae63 /extensions
parent43b0d4f709a3a1446a32e36abb5deaa3bb45ddd9 (diff)
use std::vector::insert instead of push_back
because it will pre-allocate space and often is optimised to memcpy Change-Id: I03ed7915f2762d3d27e378638052a47a28bbf096 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123588 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/propctrlr/formcomponenthandler.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index 92c03d54e17c..a005a33e7019 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -2359,8 +2359,7 @@ namespace pcr
SAL_WARN("extensions.propctrlr", "impl_initFieldList_nothrow: unable to get property " PROPERTY_COMMANDTYPE);
const Sequence<OUString> aNames = ::dbtools::getFieldNamesByCommandDescriptor( m_xRowSetConnection, nObjectType, sObjectName );
- for ( const OUString& rField : aNames )
- _rFieldNames.push_back( rField );
+ _rFieldNames.insert( _rFieldNames.end(), aNames.begin(), aNames.end() );
}
}
catch (const Exception&)
@@ -2491,8 +2490,7 @@ namespace pcr
return;
const Sequence<OUString> aNames = xTableNames->getElementNames();
- for ( const OUString& rTableName : aNames )
- _out_rNames.push_back( rTableName );
+ _out_rNames.insert( _out_rNames.end(), aNames.begin(), aNames.end() );
}