diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2018-11-21 02:49:30 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-21 09:32:34 +0100 |
commit | b80c56f2798abca7b44ecf7c0fd9948a0b966e10 (patch) | |
tree | 72885730b7862df4b335081bcb29d88f6cc29dbd /svx/source/dialog/srchdlg.cxx | |
parent | 3ad881feafebd90888ece906382c0e69390b79c2 (diff) |
Simplify containers iterations in svx/source/[a-e]*
Use range-based loop or replace with STL functions
Change-Id: I7a24407f9e8f38b4903a643210ca4511372d91f2
Reviewed-on: https://gerrit.libreoffice.org/63687
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/dialog/srchdlg.cxx')
-rw-r--r-- | svx/source/dialog/srchdlg.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 20cd94e06252..e86d1f4e9847 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -1627,11 +1627,8 @@ void SvxSearchDialog::Remember_Impl( const OUString &rStr, bool _bSearch ) ComboBox* pListBox = _bSearch ? m_pSearchLB.get() : m_pReplaceLB.get(); // ignore identical strings - for (std::vector<OUString>::const_iterator i = pArr->begin(); i != pArr->end(); ++i) - { - if ((*i) == rStr) - return; - } + if (std::find(pArr->begin(), pArr->end(), rStr) != pArr->end()) + return; // delete oldest entry at maximum occupancy (ListBox and Array) if(REMEMBER_SIZE < pArr->size()) |