diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2018-08-29 00:47:33 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-29 11:40:29 +0200 |
commit | 085269d25a705b656436feac47149296b4b4b35d (patch) | |
tree | 3195c0526652ebd9e125507aa17cd15b2acfb368 /sal | |
parent | b0e74b65a86eb965c3e93da2fb77972cc5445f3c (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 'sal')
-rw-r--r-- | sal/cppunittester/cppunittester.cxx | 2 | ||||
-rw-r--r-- | sal/osl/all/debugbase.cxx | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx index f6be50375057..b4c15ea434a5 100644 --- a/sal/cppunittester/cppunittester.cxx +++ b/sal/cppunittester/cppunittester.cxx @@ -206,7 +206,7 @@ bool addRecursiveTests(const std::vector<std::string>& test_names, CppUnit::Test { CppUnit::Test* pNewTest = pTest->getChildTestAt(i); ret |= addRecursiveTests(test_names, pNewTest, rRunner); - if (std::find_if(test_names.begin(), test_names.end(), test_name_compare(pNewTest->getName())) != test_names.end()) + if (std::any_of(test_names.begin(), test_names.end(), test_name_compare(pNewTest->getName()))) { rRunner.addTest(pNewTest); ret = true; diff --git a/sal/osl/all/debugbase.cxx b/sal/osl/all/debugbase.cxx index ea46777dc640..91486be50ecf 100644 --- a/sal/osl/all/debugbase.cxx +++ b/sal/osl/all/debugbase.cxx @@ -89,8 +89,8 @@ bool SAL_CALL osl_detail_ObjectRegistry_storeAddresses( char const* pName ) if ( rFirst == "all" ) return true; auto const iEnd( rVec.cend() ); - return std::find_if( rVec.begin(), iEnd, - [pName] (OString const& it) { return isSubStr(pName, it); }) != iEnd; + return std::any_of( rVec.begin(), iEnd, + [pName] (OString const& it) { return isSubStr(pName, it); }); } bool SAL_CALL osl_detail_ObjectRegistry_checkObjectCount( |