diff options
author | Jorenz Paragas <j.paragas.237@gmail.com> | 2015-08-01 12:36:33 -0700 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-08-03 07:02:57 +0000 |
commit | 37ec6cbeebc5dc9bf642eedcf45f0441edd3d610 (patch) | |
tree | 9ab7fc6c7c7f6a6ece96fa54cd6d66f6bc7b2e79 /connectivity/source/manager | |
parent | 4a2e0fa708bb00d35febe9e8939dcc0c2197e2f4 (diff) |
tdf#91112: pass by const reference to lambdas
Since the function returned by o3tl::compose1 had its parameter
passed by const reference, the same should be done for the lambda
expressions that replace o3tl::compose1. I overlooked this detail
in my previous commits.
Change-Id: I0db5eec4e74d4835e786742ee6de3805215f377f
Reviewed-on: https://gerrit.libreoffice.org/17465
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'connectivity/source/manager')
-rw-r--r-- | connectivity/source/manager/mdrivermanager.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx index 8553ba4e028e..4b4ad1be7502 100644 --- a/connectivity/source/manager/mdrivermanager.cxx +++ b/connectivity/source/manager/mdrivermanager.cxx @@ -646,9 +646,9 @@ Reference< XDriver > OSDBCDriverManager::implGetDriverForURL(const OUString& _rU aFind = ::std::find_if( m_aDriversBS.begin(), // begin of search range m_aDriversBS.end(), // end of search range - [&_rURL, this] (DriverAccessArray::value_type driverAccess) { + [&_rURL, this] (const DriverAccessArray::value_type& driverAccess) { // extract the driver from the access, then ask the resulting driver for acceptance - const DriverAccess &ensuredAccess = EnsureDriver(m_xContext)(driverAccess); + const DriverAccess& ensuredAccess = EnsureDriver(m_xContext)(driverAccess); const Reference<XDriver> driver = ExtractDriverFromAccess()(ensuredAccess); return AcceptsURL(_rURL)(driver); }); @@ -670,7 +670,7 @@ Reference< XDriver > OSDBCDriverManager::implGetDriverForURL(const OUString& _rU DriverCollection::iterator aPos = ::std::find_if( m_aDriversRT.begin(), // begin of search range m_aDriversRT.end(), // end of search range - [&_rURL] (DriverCollection::value_type element) { + [&_rURL] (const DriverCollection::value_type& element) { // extract the driver from the collection element, then ask the resulting driver for acceptance const Reference<XDriver> driver = ExtractDriverFromCollectionElement()(element); return AcceptsURL(_rURL)(driver); |