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 /jvmfwk | |
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 'jvmfwk')
-rw-r--r-- | jvmfwk/plugins/sunmajor/pluginlib/util.cxx | 5 | ||||
-rw-r--r-- | jvmfwk/source/framework.cxx | 5 |
2 files changed, 3 insertions, 7 deletions
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx index 08cb1fff7e5b..77823293ef83 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx @@ -128,10 +128,7 @@ bool addJREInfo( rtl::Reference<VendorBase> const & info, std::vector<rtl::Reference<VendorBase>> & infos) { - auto i( - std::find_if( - infos.begin(), infos.end(), InfoFindSame(info->getHome()))); - if (i == infos.end()) { + if (std::none_of(infos.begin(), infos.end(), InfoFindSame(info->getHome()))) { infos.push_back(info); return true; } else { diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx index b2532c48914d..a748d77cff37 100644 --- a/jvmfwk/source/framework.cxx +++ b/jvmfwk/source/framework.cxx @@ -118,13 +118,12 @@ javaFrameworkError jfw_findAllJREs(std::vector<std::unique_ptr<JavaInfo>> *pparI // for the vendors for which there is a javaSelection/plugins/ // library entry in the javavendors.xml; jfw_getJavaInfoByPath // can return a JavaInfo of any vendor: - if ((std::find_if( + if ((std::none_of( vecInfo.begin(), vecInfo.end(), [&aInfo](std::unique_ptr<JavaInfo> const & info) { return areEqualJavaInfo( info.get(), aInfo.get()); - }) - == vecInfo.end()) + })) && (std::find( vecVendors.begin(), vecVendors.end(), aInfo->sVendor) |