diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2022-11-22 19:00:36 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2022-11-29 17:39:45 (GMT) |
commit | 714a466eeb42809fa56d78d6aef6cde70d938af5 (patch) | |
tree | 3da0f6bfd63482bf0af78ae0244842f199478b7e /Source | |
parent | 6d2aa54d620a6526cc23e59b30ee0191d61ac59d (diff) | |
download | CMake-714a466eeb42809fa56d78d6aef6cde70d938af5.zip CMake-714a466eeb42809fa56d78d6aef6cde70d938af5.tar.gz CMake-714a466eeb42809fa56d78d6aef6cde70d938af5.tar.bz2 |
clang-tidy: fix `readability-container-size-empty` lints
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalVisualStudio7Generator.cxx | 2 | ||||
-rw-r--r-- | Source/cmVSSetupHelper.cxx | 4 | ||||
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index ed1f333..69b3c22 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -457,7 +457,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution( std::string cumulativePath; for (std::string const& iter : tokens) { - if (!iter.size()) { + if (iter.empty()) { continue; } diff --git a/Source/cmVSSetupHelper.cxx b/Source/cmVSSetupHelper.cxx index 43c52bf..db85e86 100644 --- a/Source/cmVSSetupHelper.cxx +++ b/Source/cmVSSetupHelper.cxx @@ -496,7 +496,7 @@ bool cmVSSetupAPIHelper::EnumerateAndChooseVSInstance() return this->LoadSpecifiedVSInstanceFromDisk(); } - if (vecVSInstances.size() > 0) { + if (!vecVSInstances.empty()) { isVSInstanceExists = true; int index = ChooseVSInstance(vecVSInstances); chosenInstanceInfo = vecVSInstances[index]; @@ -508,7 +508,7 @@ bool cmVSSetupAPIHelper::EnumerateAndChooseVSInstance() int cmVSSetupAPIHelper::ChooseVSInstance( const std::vector<VSInstanceInfo>& vecVSInstances) { - if (vecVSInstances.size() == 0) + if (vecVSInstances.empty()) return -1; if (vecVSInstances.size() == 1) diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 07adce0..28df926 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2533,7 +2533,7 @@ void cmVisualStudio10TargetGenerator::WriteAllSources(Elem& e0) Elem e2(e1, tool); bool isCSharp = (si.Source->GetLanguage() == "CSharp"); - if (isCSharp && exclude_configs.size() > 0) { + if (isCSharp && !exclude_configs.empty()) { std::stringstream conditions; bool firstConditionSet{ false }; for (const auto& ci : include_configs) { |