summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-11-05 14:48:20 +0200
committerNoel Grandin <noel@peralex.com>2014-11-05 15:59:23 +0200
commit5f15cc01b31ccaed0c6482a36556dece084ce302 (patch)
treeab5c82c5a261044f62965e0cdd333a2094fc20b1 /connectivity
parent801cb231f2e2b43f4befd9575e23da58d764c600 (diff)
new loplugin: use more efficient find() methods
(Original idea from Kendy) Look for code that is calling std::find on a sorted container (set/map/vector) and warn about it - the code should be using the find method on the container itself, since that is considerably faster. Change-Id: Ib74e5d3faa836eeb0df16a736d202696626bdfd2
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/mork/MQueryHelper.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/connectivity/source/drivers/mork/MQueryHelper.cxx b/connectivity/source/drivers/mork/MQueryHelper.cxx
index ff1d14e24f9a..686af4e09148 100644
--- a/connectivity/source/drivers/mork/MQueryHelper.cxx
+++ b/connectivity/source/drivers/mork/MQueryHelper.cxx
@@ -228,7 +228,7 @@ sal_Int32 MQueryHelper::executeQuery(OConnection* xConnection, MQueryExpression
{
int rowId = rowIter->first;
// belongs this row id to the list table?
- if (listRecords.end() == std::find(listRecords.begin(), listRecords.end(), rowId))
+ if (listRecords.end() == listRecords.find(rowId))
{
// no, skip it
continue;