summaryrefslogtreecommitdiffstats
path: root/Source/cmState.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/cmState.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/cmState.cxx')
-rw-r--r--Source/cmState.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index 4252022..d97762b 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -110,12 +110,9 @@ bool cmState::StringToCacheEntryType(const std::string& s,
bool cmState::IsCacheEntryType(std::string const& key)
{
- for (const std::string& i : cmCacheEntryTypes) {
- if (key == i) {
- return true;
- }
- }
- return false;
+ return std::any_of(
+ cmCacheEntryTypes.begin(), cmCacheEntryTypes.end(),
+ [&key](std::string const& i) -> bool { return key == i; });
}
bool cmState::LoadCache(const std::string& path, bool internal,