summaryrefslogtreecommitdiffstats
path: root/dbaccess
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 /dbaccess
parenttdf#138842 Delete Default item from Calc Comment's context menu (diff)
downloadcore-1f9468fc29874eae5100317282ab8b395904406d.tar.gz
core-1f9468fc29874eae5100317282ab8b395904406d.zip
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 'dbaccess')
-rw-r--r--dbaccess/source/core/api/TableDeco.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/dbaccess/source/core/api/TableDeco.cxx b/dbaccess/source/core/api/TableDeco.cxx
index 60cbce747e01..f40593b8598d 100644
--- a/dbaccess/source/core/api/TableDeco.cxx
+++ b/dbaccess/source/core/api/TableDeco.cxx
@@ -532,11 +532,8 @@ void ODBTableDecorator::refreshColumns()
xNames = m_xTable->getColumns();
if(xNames.is())
{
- Sequence< OUString> aNames = xNames->getElementNames();
- const OUString* pIter = aNames.getConstArray();
- const OUString* pEnd = pIter + aNames.getLength();
- for(;pIter != pEnd;++pIter)
- aVector.push_back(*pIter);
+ const Sequence< OUString> aNames = xNames->getElementNames();
+ aVector.insert(aVector.end(), aNames.begin(), aNames.end());
}
}
if(!m_pColumns)