Replace 'foo.size() > 0' pattern with !foo.empty().

This commit is contained in:
Stephen Kelly 2015-01-16 01:10:07 +01:00
parent ddb7f280ce
commit 0e14c7ee63
3 changed files with 3 additions and 3 deletions

View File

@ -191,7 +191,7 @@ int cmCPackIFWGenerator::PackageFiles()
}
}
// TODO: set correct name for multipackages
if (this->packageFileNames.size() > 0)
if (!this->packageFileNames.empty())
{
ifwCmd += " " + packageFileNames[0];
}

View File

@ -250,7 +250,7 @@ void cmGlobalVisualStudio71Generator
std::set<std::string>::const_iterator it;
for(it = depends.begin(); it != depends.end(); ++it)
{
if(it->size() > 0)
if(!it->empty())
{
fout << "\t\t{"
<< this->GetGUID(it->c_str())

View File

@ -265,7 +265,7 @@ cmGlobalVisualStudioGenerator
{
std::vector<std::string> filenames;
this->GetFilesReplacedDuringGenerate(filenames);
if (filenames.size() > 0)
if (!filenames.empty())
{
// Convert vector to semi-colon delimited string of filenames:
std::string projects;