diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2022-11-22 20:05:57 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2022-11-29 17:39:45 (GMT) |
commit | 707172c66ee385474027aae5e1327c76abd96ce8 (patch) | |
tree | d5fc6e2549df4eabb301f1b063521364aee96a8f /Source/cmVisualStudioGeneratorOptions.cxx | |
parent | 501408338aa403d9af50b2ba60f816cec5dcc06b (diff) | |
download | CMake-707172c66ee385474027aae5e1327c76abd96ce8.zip CMake-707172c66ee385474027aae5e1327c76abd96ce8.tar.gz CMake-707172c66ee385474027aae5e1327c76abd96ce8.tar.bz2 |
clang-tidy: fix `readability-use-anyofallof` lints
Diffstat (limited to 'Source/cmVisualStudioGeneratorOptions.cxx')
-rw-r--r-- | Source/cmVisualStudioGeneratorOptions.cxx | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx index 763f676..6e98874 100644 --- a/Source/cmVisualStudioGeneratorOptions.cxx +++ b/Source/cmVisualStudioGeneratorOptions.cxx @@ -137,22 +137,14 @@ bool cmVisualStudioGeneratorOptions::IsManaged() const bool cmVisualStudioGeneratorOptions::UsingUnicode() const { // Look for a _UNICODE definition. - for (std::string const& di : this->Defines) { - if (di == "_UNICODE") { - return true; - } - } - return false; + return std::any_of(this->Defines.begin(), this->Defines.end(), + [](std::string const& di) { return di == "_UNICODE"; }); } bool cmVisualStudioGeneratorOptions::UsingSBCS() const { // Look for a _SBCS definition. - for (std::string const& di : this->Defines) { - if (di == "_SBCS") { - return true; - } - } - return false; + return std::any_of(this->Defines.begin(), this->Defines.end(), + [](std::string const& di) { return di == "_SBCS"; }); } void cmVisualStudioGeneratorOptions::FixCudaCodeGeneration() |