summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorJorenz Paragas <j.paragas.237@gmail.com>2015-08-01 12:36:33 -0700
committerNoel Grandin <noelgrandin@gmail.com>2015-08-03 07:02:57 +0000
commit37ec6cbeebc5dc9bf642eedcf45f0441edd3d610 (patch)
tree9ab7fc6c7c7f6a6ece96fa54cd6d66f6bc7b2e79 /connectivity
parent4a2e0fa708bb00d35febe9e8939dcc0c2197e2f4 (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')
-rw-r--r--connectivity/source/drivers/ado/AColumn.cxx2
-rw-r--r--connectivity/source/drivers/ado/AColumns.cxx2
-rw-r--r--connectivity/source/drivers/ado/AConnection.cxx2
-rw-r--r--connectivity/source/drivers/hsqldb/HDriver.cxx4
-rw-r--r--connectivity/source/drivers/hsqldb/HStorageMap.cxx4
-rw-r--r--connectivity/source/drivers/odbc/OResultSet.cxx2
-rw-r--r--connectivity/source/manager/mdrivermanager.cxx6
7 files changed, 11 insertions, 11 deletions
diff --git a/connectivity/source/drivers/ado/AColumn.cxx b/connectivity/source/drivers/ado/AColumn.cxx
index 81e18c5b1193..0e91b49e9503 100644
--- a/connectivity/source/drivers/ado/AColumn.cxx
+++ b/connectivity/source/drivers/ado/AColumn.cxx
@@ -216,7 +216,7 @@ void OAdoColumn::fillPropertyValues()
{
::comphelper::UStringMixEqual aCase(sal_False);
OTypeInfoMap::const_iterator aFind = ::std::find_if(pTypeInfoMap->begin(), pTypeInfoMap->end(),
- [&aCase] (OTypeInfoMap::value_type typeInfo) {
+ [&aCase] (const OTypeInfoMap::value_type& typeInfo) {
return aCase(typeInfo.second->getDBName(), OUString("VarBinary"));
});
diff --git a/connectivity/source/drivers/ado/AColumns.cxx b/connectivity/source/drivers/ado/AColumns.cxx
index 66af0bc58aeb..56a253c18399 100644
--- a/connectivity/source/drivers/ado/AColumns.cxx
+++ b/connectivity/source/drivers/ado/AColumns.cxx
@@ -89,7 +89,7 @@ sdbcx::ObjectType OColumns::appendObject( const OUString&, const Reference< XPro
::comphelper::UStringMixEqual aCase(sal_False);
// search for typeinfo where the typename is equal sTypeName
OTypeInfoMap::const_iterator aFind = ::std::find_if(pTypeInfoMap->begin(), pTypeInfoMap->end(),
- [&aCase, &sTypeName] (OTypeInfoMap::value_type typeInfo) {
+ [&aCase, &sTypeName] (const OTypeInfoMap::value_type& typeInfo) {
return aCase(typeInfo.second->getDBName(), sTypeName);
});
diff --git a/connectivity/source/drivers/ado/AConnection.cxx b/connectivity/source/drivers/ado/AConnection.cxx
index 463db7f4f833..f66adbd8baa5 100644
--- a/connectivity/source/drivers/ado/AConnection.cxx
+++ b/connectivity/source/drivers/ado/AConnection.cxx
@@ -599,7 +599,7 @@ const OExtendedTypeInfo* OConnection::getTypeInfoFromType(const OTypeInfoMap& _r
::comphelper::UStringMixEqual aCase(sal_False);
// search for typeinfo where the typename is equal _sTypeName
OTypeInfoMap::const_iterator aFind = ::std::find_if(_rTypeInfo.begin(), _rTypeInfo.end(),
- [&aCase, &_sTypeName] (OTypeInfoMap::value_type typeInfo) {
+ [&aCase, &_sTypeName] (const OTypeInfoMap::value_type& typeInfo) {
return aCase(typeInfo.second->getDBName(), _sTypeName);
});
diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx
index 373f0e81e593..5ae04b3acd88 100644
--- a/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -584,7 +584,7 @@ namespace connectivity
{
OUString sKey = StorageContainer::getRegisteredKey(xStorage);
TWeakPairVector::iterator i = ::std::find_if(m_aConnections.begin(),m_aConnections.end(),
- [&sKey] (TWeakPairVector::value_type conn) {
+ [&sKey] (const TWeakPairVector::value_type& conn) {
return conn.second.first == sKey;
});
@@ -640,7 +640,7 @@ namespace connectivity
if ( !sKey.isEmpty() )
{
TWeakPairVector::iterator i = ::std::find_if(m_aConnections.begin(), m_aConnections.end(),
- [&sKey] (TWeakPairVector::value_type conn) {
+ [&sKey] (const TWeakPairVector::value_type& conn) {
return conn.second.first == sKey;
});
diff --git a/connectivity/source/drivers/hsqldb/HStorageMap.cxx b/connectivity/source/drivers/hsqldb/HStorageMap.cxx
index dd84f849ec72..321a12942d7b 100644
--- a/connectivity/source/drivers/hsqldb/HStorageMap.cxx
+++ b/connectivity/source/drivers/hsqldb/HStorageMap.cxx
@@ -171,7 +171,7 @@ namespace connectivity
TStorages& rMap = lcl_getStorageMap();
// check if the storage is already in our map
TStorages::iterator aFind = ::std::find_if(rMap.begin(),rMap.end(),
- [&_xStorage] (TStorages::value_type storage) {
+ [&_xStorage] (const TStorages::value_type& storage) {
// TStoragePair (second) -> TStorageURLPair (first) -> uno::Reference<XStorage> (first)
return storage.second.first.first == _xStorage;
});
@@ -203,7 +203,7 @@ namespace connectivity
TStorages& rMap = lcl_getStorageMap();
// check if the storage is already in our map
TStorages::iterator aFind = ::std::find_if(rMap.begin(),rMap.end(),
- [&_xStorage] (TStorages::value_type storage) {
+ [&_xStorage] (const TStorages::value_type& storage) {
// TStoragePair (second) -> TStorageURLPair (first) -> uno::Reference<XStorage> (first)
return storage.second.first.first == _xStorage;
});
diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx b/connectivity/source/drivers/odbc/OResultSet.cxx
index bd78ac57cdea..5e9c840f456f 100644
--- a/connectivity/source/drivers/odbc/OResultSet.cxx
+++ b/connectivity/source/drivers/odbc/OResultSet.cxx
@@ -1167,7 +1167,7 @@ Sequence<sal_Int8> OResultSet::impl_getBookmark( ) throw( SQLException, Runtim
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
TBookmarkPosMap::iterator aFind = ::std::find_if(m_aPosToBookmarks.begin(),m_aPosToBookmarks.end(),
- [this] (TBookmarkPosMap::value_type bookmarkPos) {
+ [this] (const TBookmarkPosMap::value_type& bookmarkPos) {
return bookmarkPos.second == m_nRowPos;
});
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);