summaryrefslogtreecommitdiffstats
path: root/Source/cmState.cxx
diff options
context:
space:
mode:
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,