summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2018-08-29 00:47:33 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-29 11:40:29 +0200
commit085269d25a705b656436feac47149296b4b4b35d (patch)
tree3195c0526652ebd9e125507aa17cd15b2acfb368 /dbaccess
parentb0e74b65a86eb965c3e93da2fb77972cc5445f3c (diff)
Replace find_if with proper quantifier algorithms
Change-Id: Icc820a47ac891c358883f9c01224f676c58fdd11 Reviewed-on: https://gerrit.libreoffice.org/59744 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/app/subcomponentmanager.cxx4
-rw-r--r--dbaccess/source/ui/browser/formadapter.cxx4
-rw-r--r--dbaccess/source/ui/browser/genericcontroller.cxx4
-rw-r--r--dbaccess/source/ui/misc/RowSetDrop.cxx4
-rw-r--r--dbaccess/source/ui/misc/WCopyTable.cxx4
5 files changed, 10 insertions, 10 deletions
diff --git a/dbaccess/source/ui/app/subcomponentmanager.cxx b/dbaccess/source/ui/app/subcomponentmanager.cxx
index c6d1bb33085c..c235320ddc1f 100644
--- a/dbaccess/source/ui/app/subcomponentmanager.cxx
+++ b/dbaccess/source/ui/app/subcomponentmanager.cxx
@@ -455,12 +455,12 @@ namespace dbaui
if ( !_rName.isEmpty() )
{
// check there does not already exist such a component
- SubComponents::const_iterator existentPos = std::find_if(
+ auto subComponentNotExists = std::none_of(
m_pData->m_aComponents.begin(),
m_pData->m_aComponents.end(),
SubComponentMatch( _rName, _nComponentType, _eOpenMode )
);
- OSL_ENSURE( existentPos == m_pData->m_aComponents.end(), "already existent!" );
+ OSL_ENSURE( subComponentNotExists, "already existent!" );
}
#endif
SubComponentDescriptor aElement( _rName, _nComponentType, _eOpenMode, _rxComponent );
diff --git a/dbaccess/source/ui/browser/formadapter.cxx b/dbaccess/source/ui/browser/formadapter.cxx
index e2c796e7b65d..cc6b13e6e2f8 100644
--- a/dbaccess/source/ui/browser/formadapter.cxx
+++ b/dbaccess/source/ui/browser/formadapter.cxx
@@ -1419,9 +1419,9 @@ void SbaXFormAdapter::implInsert(const Any& aElement, sal_Int32 nIndex, const OU
sal_Int32 SbaXFormAdapter::implGetPos(const OUString& rName)
{
- std::vector< OUString>::const_iterator aIter = std::find_if( m_aChildNames.begin(),
+ std::vector< OUString>::const_iterator aIter = std::find( m_aChildNames.begin(),
m_aChildNames.end(),
- [&rName](OUString const & s) { return s == rName; });
+ rName);
if(aIter != m_aChildNames.end())
return aIter - m_aChildNames.begin();
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx
index 588f38e81c5a..8baf8a5693ba 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -524,12 +524,12 @@ void OGenericUnoController::ImplInvalidateFeature( sal_Int32 _nId, const Referen
#if OSL_DEBUG_LEVEL > 0
if ( _nId != -1 )
{
- SupportedFeatures::const_iterator aFeaturePos = std::find_if(
+ auto isSupportedFeature = std::any_of(
m_aSupportedFeatures.begin(),
m_aSupportedFeatures.end(),
CompareFeatureById( _nId )
);
- OSL_ENSURE( aFeaturePos != m_aSupportedFeatures.end(), "OGenericUnoController::ImplInvalidateFeature: invalidating an unsupported feature is suspicious, at least!" );
+ OSL_ENSURE( isSupportedFeature, "OGenericUnoController::ImplInvalidateFeature: invalidating an unsupported feature is suspicious, at least!" );
}
#endif
diff --git a/dbaccess/source/ui/misc/RowSetDrop.cxx b/dbaccess/source/ui/misc/RowSetDrop.cxx
index b4e605f2754e..2fff06db9a9e 100644
--- a/dbaccess/source/ui/misc/RowSetDrop.cxx
+++ b/dbaccess/source/ui/misc/RowSetDrop.cxx
@@ -100,8 +100,8 @@ bool ORowSetImportExport::Write()
bool ORowSetImportExport::Read()
{
// check if there is any column to copy
- if(std::find_if(m_aColumnMapping.begin(),m_aColumnMapping.end(),
- [](sal_Int32 n) { return n > 0; }) == m_aColumnMapping.end())
+ if(std::none_of(m_aColumnMapping.begin(),m_aColumnMapping.end(),
+ [](sal_Int32 n) { return n > 0; }))
return false;
bool bContinue = true;
if(m_aSelection.getLength())
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index 7c86eced09f2..7d49411122a5 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -866,9 +866,9 @@ IMPL_LINK_NOARG(OCopyTableWizard, ImplOKHdl, Button*, void)
{
if ( supportsPrimaryKey() )
{
- ODatabaseExport::TColumns::const_iterator aFind = std::find_if(m_vDestColumns.begin(),m_vDestColumns.end(),
+ bool noPrimaryKey = std::none_of(m_vDestColumns.begin(),m_vDestColumns.end(),
[] (const ODatabaseExport::TColumns::value_type& tCol) { return tCol.second->IsPrimaryKey(); });
- if ( aFind == m_vDestColumns.end() && m_xInteractionHandler.is() )
+ if ( noPrimaryKey && m_xInteractionHandler.is() )
{
OUString sMsg(DBA_RES(STR_TABLEDESIGN_NO_PRIM_KEY));