summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudioGeneratorOptions.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmVisualStudioGeneratorOptions.cxx')
-rw-r--r--Source/cmVisualStudioGeneratorOptions.cxx16
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()