diff options
author | David Kalnischkies <david@kalnischkies.de> | 2019-07-08 15:48:59 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2019-07-08 15:51:17 +0200 |
commit | 2b734a7ec429825c7007c1093883229e069d36c7 (patch) | |
tree | b67360f3201634c82f5a9e7dd84f47b28fa63acb /apt-pkg/contrib/hashes.cc | |
parent | cbe90ee516d7f747f981e423f164f99eb767240b (diff) |
Apply various suggestions by cppcheck
Reported-By: cppcheck
Diffstat (limited to 'apt-pkg/contrib/hashes.cc')
-rw-r--r-- | apt-pkg/contrib/hashes.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/apt-pkg/contrib/hashes.cc b/apt-pkg/contrib/hashes.cc index d03fb6083..366133b02 100644 --- a/apt-pkg/contrib/hashes.cc +++ b/apt-pkg/contrib/hashes.cc @@ -169,10 +169,7 @@ bool HashStringList::usable() const /*{{{*/ if (forcedType.empty() == true) { // See if there is at least one usable hash - for (auto const &hs: list) - if (hs.usable()) - return true; - return false; + return std::any_of(list.begin(), list.end(), [](auto const &hs) { return hs.usable(); }); } return find(forcedType) != NULL; } |