mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-13 01:29:02 -05:00
clang-tidy: fix readability-container-size-empty lints
This commit is contained in:
@@ -457,7 +457,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
|
||||
std::string cumulativePath;
|
||||
|
||||
for (std::string const& iter : tokens) {
|
||||
if (!iter.size()) {
|
||||
if (iter.empty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user