summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-03-02 11:28:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-03-02 11:28:37 +0200
commit4730b23b1da929b802d527611e974ff1b1e6d6c5 (patch)
tree0809450a51e0aae057f19a1acd84dad5ec77a9b5 /dbaccess
parent42460fd4eb4757dcdf3b3e533aafabda77751321 (diff)
use std::vector::insert when inserting multiple of the same thing
instead of looping Change-Id: I7b8c1663e303449302e0b96dc5b483367c2a52ba
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx3
-rw-r--r--dbaccess/source/ui/querydesign/TableFieldDescription.cxx3
2 files changed, 2 insertions, 4 deletions
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index b0d0581bacf6..d0ba3523d217 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -140,8 +140,7 @@ OSelectionBrowseBox::OSelectionBrowseBox( vcl::Window* pParent )
for (sal_Int32 nIdx = 0; nIdx < nCount; nIdx++)
m_pOrderCell->InsertEntry(aTxt.getToken(nIdx, ';'));
- for(long i=0;i < BROW_ROW_CNT;i++)
- m_bVisibleRow.push_back(true);
+ m_bVisibleRow.insert(m_bVisibleRow.end(), BROW_ROW_CNT, true);
m_bVisibleRow[BROW_FUNCTION_ROW] = false; // first hide
diff --git a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx b/dbaccess/source/ui/querydesign/TableFieldDescription.cxx
index 21e7348d9d2f..20298d11006b 100644
--- a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx
+++ b/dbaccess/source/ui/querydesign/TableFieldDescription.cxx
@@ -104,8 +104,7 @@ void OTableFieldDesc::SetCriteria( sal_uInt16 nIdx, const OUString& rCrit)
m_aCriteria[nIdx] = rCrit;
else
{
- for(sal_Int32 i=m_aCriteria.size();i<nIdx;++i)
- m_aCriteria.push_back( OUString());
+ m_aCriteria.insert(m_aCriteria.end(), nIdx - m_aCriteria.size(), OUString());
m_aCriteria.push_back(rCrit);
}
}