clang-tidy: fix readability-container-size-empty lints

This commit is contained in:
Ben Boeckel
2022-11-22 14:00:36 -05:00
parent 6d2aa54d62
commit 714a466eeb
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -457,7 +457,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
std::string cumulativePath;
for (std::string const& iter : tokens) {
if (!iter.size()) {
if (iter.empty()) {
continue;
}
+2 -2
View File
@@ -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)
+1 -1
View File
@@ -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) {