summaryrefslogtreecommitdiff
path: root/dbaccess
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 /dbaccess
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 'dbaccess')
-rw-r--r--dbaccess/source/core/dataaccess/definitioncontainer.cxx4
-rw-r--r--dbaccess/source/ui/control/tabletree.cxx4
-rw-r--r--dbaccess/source/ui/misc/DExport.cxx2
-rw-r--r--dbaccess/source/ui/misc/WColumnSelect.cxx4
-rw-r--r--dbaccess/source/ui/misc/WCopyTable.cxx4
5 files changed, 9 insertions, 9 deletions
diff --git a/dbaccess/source/core/dataaccess/definitioncontainer.cxx b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
index 6e0c78113922..f6a5f490523f 100644
--- a/dbaccess/source/core/dataaccess/definitioncontainer.cxx
+++ b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
@@ -65,7 +65,7 @@ ODefinitionContainer_Impl::const_iterator ODefinitionContainer_Impl::find( TCont
return ::std::find_if(
m_aDefinitions.begin(),
m_aDefinitions.end(),
- [&_pDefinition] (NamedDefinitions::value_type namedDef) {
+ [&_pDefinition] (const NamedDefinitions::value_type& namedDef) {
return namedDef.second == _pDefinition;
});
}
@@ -75,7 +75,7 @@ ODefinitionContainer_Impl::iterator ODefinitionContainer_Impl::find( TContentPtr
return ::std::find_if(
m_aDefinitions.begin(),
m_aDefinitions.end(),
- [&_pDefinition] (NamedDefinitions::value_type namedDef) {
+ [&_pDefinition] (const NamedDefinitions::value_type& namedDef) {
return namedDef.second == _pDefinition;
});
}
diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx
index 5d5ec4cf0d06..7afce2ecbd77 100644
--- a/dbaccess/source/ui/control/tabletree.cxx
+++ b/dbaccess/source/ui/control/tabletree.cxx
@@ -261,10 +261,10 @@ void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConn
{
OUString sRootEntryText;
if ( ::std::none_of(_rTables.begin(),_rTables.end(),
- [] (TNames::value_type name) { return !name.second; }) )
+ [] (const TNames::value_type& name) { return !name.second; }) )
sRootEntryText = ModuleRes(STR_ALL_TABLES);
else if ( ::std::none_of(_rTables.begin(),_rTables.end(),
- [] (TNames::value_type name) { return name.second; }) )
+ [] (const TNames::value_type& name) { return name.second; }) )
sRootEntryText = ModuleRes(STR_ALL_VIEWS);
else
sRootEntryText = ModuleRes(STR_ALL_TABLES_AND_VIEWS);
diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx
index 81f6531f932b..f8465fe856be 100644
--- a/dbaccess/source/ui/misc/DExport.cxx
+++ b/dbaccess/source/ui/misc/DExport.cxx
@@ -834,7 +834,7 @@ Reference< XPreparedStatement > ODatabaseExport::createPreparedStatment( const R
for(size_t j=0; j < aInsertList.size() ;++i,++j)
{
ODatabaseExport::TPositions::const_iterator aFind = ::std::find_if(_rvColumns.begin(),_rvColumns.end(),
- [i] (ODatabaseExport::TPositions::value_type tPos) { return tPos.second == i+1; });
+ [i] (const ODatabaseExport::TPositions::value_type& tPos) { return tPos.second == i+1; });
if ( _rvColumns.end() != aFind && aFind->second != sal::static_int_cast< long >(CONTAINER_ENTRY_NOTFOUND) && aFind->first != sal::static_int_cast< long >(CONTAINER_ENTRY_NOTFOUND) )
{
OSL_ENSURE((aFind->first) < static_cast<sal_Int32>(aInsertList.size()),"aInsertList: Illegal index for vector");
diff --git a/dbaccess/source/ui/misc/WColumnSelect.cxx b/dbaccess/source/ui/misc/WColumnSelect.cxx
index 9904a6efb3d4..d7ae174e4b65 100644
--- a/dbaccess/source/ui/misc/WColumnSelect.cxx
+++ b/dbaccess/source/ui/misc/WColumnSelect.cxx
@@ -339,7 +339,7 @@ void OWizColumnSelect::moveColumn( ListBox* _pRight,
{
// find the new column in the dest name mapping to obtain the old column
OCopyTableWizard::TNameMapping::iterator aIter = ::std::find_if(m_pParent->m_mNameMapping.begin(),m_pParent->m_mNameMapping.end(),
- [&_aCase, &_sColumnName] (OCopyTableWizard::TNameMapping::value_type nameMap) {
+ [&_aCase, &_sColumnName] (const OCopyTableWizard::TNameMapping::value_type& nameMap) {
return _aCase(nameMap.second, _sColumnName);
});
@@ -388,7 +388,7 @@ sal_uInt16 OWizColumnSelect::adjustColumnPosition( ListBox* _pLeft,
{
// find the new column in the dest name mapping to obtain the old column
OCopyTableWizard::TNameMapping::iterator aIter = ::std::find_if(m_pParent->m_mNameMapping.begin(),m_pParent->m_mNameMapping.end(),
- [&_aCase, &sColumnString] (OCopyTableWizard::TNameMapping::value_type nameMap) {
+ [&_aCase, &sColumnString] (const OCopyTableWizard::TNameMapping::value_type& nameMap) {
return _aCase(nameMap.second, sColumnString);
});
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index 1e28171738ea..f32dba666b7f 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -876,7 +876,7 @@ IMPL_LINK_NOARG(OCopyTableWizard, ImplOKHdl)
if ( supportsPrimaryKey() )
{
ODatabaseExport::TColumns::iterator aFind = ::std::find_if(m_vDestColumns.begin(),m_vDestColumns.end(),
- [] (ODatabaseExport::TColumns::value_type tCol) { return tCol.second->IsPrimaryKey(); });
+ [] (const ODatabaseExport::TColumns::value_type& tCol) { return tCol.second->IsPrimaryKey(); });
if ( aFind == m_vDestColumns.end() && m_xInteractionHandler.is() )
{
@@ -1293,7 +1293,7 @@ Reference< XPropertySet > OCopyTableWizard::createTable()
ODatabaseExport::TPositions::iterator aPosFind = ::std::find_if(
m_vColumnPos.begin(),
m_vColumnPos.end(),
- [nPos] (ODatabaseExport::TPositions::value_type tPos) {
+ [nPos] (const ODatabaseExport::TPositions::value_type& tPos) {
return tPos.first == nPos;
}
);