summaryrefslogtreecommitdiff
path: root/Source/cmInstallCommandArguments.cxx
diff options
context:
space:
mode:
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(