summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallCommandArguments.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2021-01-22 15:39:02 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2021-01-27 13:54:18 (GMT)
commitef935b17ab47739b1e81e9c6baf6112b7a20f9cb (patch)
tree7f31fc4bcf6efb450e67b29ba6713937515ca956 /Source/cmInstallCommandArguments.cxx
parent9ac8dbbb941194e79fd59acfc4affa018a222745 (diff)
downloadCMake-ef935b17ab47739b1e81e9c6baf6112b7a20f9cb.zip
CMake-ef935b17ab47739b1e81e9c6baf6112b7a20f9cb.tar.gz
CMake-ef935b17ab47739b1e81e9c6baf6112b7a20f9cb.tar.bz2
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 a034689..cc3df2a 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(