From 0e14c7ee6375fcaa975194557523f5a1a8686a8a Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Fri, 16 Jan 2015 01:10:07 +0100 Subject: Replace 'foo.size() > 0' pattern with !foo.empty(). --- Source/CPack/IFW/cmCPackIFWGenerator.cxx | 2 +- Source/cmGlobalVisualStudio71Generator.cxx | 2 +- Source/cmGlobalVisualStudioGenerator.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.cxx b/Source/CPack/IFW/cmCPackIFWGenerator.cxx index 09e123c..43d34ee 100644 --- a/Source/CPack/IFW/cmCPackIFWGenerator.cxx +++ b/Source/CPack/IFW/cmCPackIFWGenerator.cxx @@ -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]; } diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx index 1ab4c9c..f7b6470 100644 --- a/Source/cmGlobalVisualStudio71Generator.cxx +++ b/Source/cmGlobalVisualStudio71Generator.cxx @@ -250,7 +250,7 @@ void cmGlobalVisualStudio71Generator std::set::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()) diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index c38a35a..553d568 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -265,7 +265,7 @@ cmGlobalVisualStudioGenerator { std::vector filenames; this->GetFilesReplacedDuringGenerate(filenames); - if (filenames.size() > 0) + if (!filenames.empty()) { // Convert vector to semi-colon delimited string of filenames: std::string projects; -- cgit v0.12