From 5f15cc01b31ccaed0c6482a36556dece084ce302 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 5 Nov 2014 14:48:20 +0200 Subject: 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 --- connectivity/source/drivers/mork/MQueryHelper.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'connectivity/source') 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; -- cgit