diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2018-09-08 09:50:18 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-08 14:46:08 +0200 |
commit | 97b6fd8e9ec4c655a5b73cbb4f64be06e7057242 (patch) | |
tree | c10735e6b9cd736a3f297283327ed746db0f5d52 /dbaccess | |
parent | b678dee6a856e3c0bd4e969db76f6a19970e5343 (diff) |
Replace find_if with proper quantifier algorithms
Missed in 085269d25a705b656436feac47149296b4b4b35d
Change-Id: I3cfab57232908b48d090658e0fbc948d62b3fc6f
Reviewed-on: https://gerrit.libreoffice.org/60180
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/SingleSelectQueryComposer.cxx | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx index 5a0bead4c8be..4892df42be23 100644 --- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx +++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx @@ -891,20 +891,15 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) OUString sRealName; xProp->getPropertyValue(PROPERTY_REALNAME) >>= sRealName; - std::vector< OUString>::const_iterator aFindName; if ( sColumnName.isEmpty() ) xProp->getPropertyValue(PROPERTY_NAME) >>= sColumnName; - aFindName = std::find_if(aNames.begin(),aNames.end(), - [&aCaseCompare, &sColumnName](const OUString& lhs) - { return aCaseCompare(lhs, sColumnName); } ); sal_Int32 j = 0; - while ( aFindName != aNames.end() ) + while ( std::any_of(aNames.begin(),aNames.end(), + [&aCaseCompare, &sColumnName](const OUString& lhs) + { return aCaseCompare(lhs, sColumnName); } ) ) { sColumnName += OUString::number(++j); - aFindName = std::find_if(aNames.begin(),aNames.end(), - [&aCaseCompare, &sColumnName](const OUString& lhs) - { return aCaseCompare(lhs, sColumnName); } ); } pColumn->setName(sColumnName); |