summaryrefslogtreecommitdiff
path: root/Source/cmInstallCommandArguments.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2021-01-22 10:39:02 -0500
committerBen Boeckel <ben.boeckel@kitware.com>2021-01-27 08:54:18 -0500
commitef935b17ab47739b1e81e9c6baf6112b7a20f9cb (patch)
tree7f31fc4bcf6efb450e67b29ba6713937515ca956 /Source/cmInstallCommandArguments.cxx
parent9ac8dbbb941194e79fd59acfc4affa018a222745 (diff)
downloadcmake-ef935b17ab47739b1e81e9c6baf6112b7a20f9cb.tar.gz
clang-tidy: fix `readability-use-anyofallof` warnings
Diffstat (limited to 'Source/cmInstallCommandArguments.cxx')
-rw-r--r--Source/cmInstallCommandArguments.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/Source/cmInstallCommandArguments.cxx b/Source/cmInstallCommandArguments.cxx
index a034689c0a..cc3df2abb3 100644
--- a/Source/cmInstallCommandArguments.cxx
+++ b/Source/cmInstallCommandArguments.cxx
@@ -2,6 +2,7 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmInstallCommandArguments.h"
+#include <algorithm>
#include <utility>
#include <cmext/string_view>
@@ -176,13 +177,11 @@ bool cmInstallCommandArguments::Finalize()
bool cmInstallCommandArguments::CheckPermissions()
{
this->PermissionsString.clear();
- for (std::string const& perm : this->Permissions) {
- if (!cmInstallCommandArguments::CheckPermissions(
- perm, this->PermissionsString)) {
- return false;
- }
- }
- return true;
+ return std::all_of(this->Permissions.begin(), this->Permissions.end(),
+ [this](std::string const& perm) -> bool {
+ return cmInstallCommandArguments::CheckPermissions(
+ perm, this->PermissionsString);
+ });
}
bool cmInstallCommandArguments::CheckPermissions(