diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-01-14 23:59:13 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-01-18 13:25:24 (GMT) |
commit | 607e19384f19fcf8713ccf0377e0255084ede785 (patch) | |
tree | 09c5363a9c5512972da5b6c459e37018ea042e6a | |
parent | 930bd4781694ea85a876c08c34a2dd8243688920 (diff) | |
download | CMake-607e19384f19fcf8713ccf0377e0255084ede785.zip CMake-607e19384f19fcf8713ccf0377e0255084ede785.tar.gz CMake-607e19384f19fcf8713ccf0377e0255084ede785.tar.bz2 |
Replace 'foo.size() != 0' pattern with !foo.empty().
-rw-r--r-- | Source/CTest/cmCTestMultiProcessHandler.cxx | 2 | ||||
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 4 | ||||
-rw-r--r-- | Source/cmAuxSourceDirectoryCommand.cxx | 2 | ||||
-rw-r--r-- | Source/cmFindPathCommand.cxx | 2 | ||||
-rw-r--r-- | Source/cmListCommand.cxx | 2 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 4 |
6 files changed, 8 insertions, 8 deletions
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index 594f53a..8da9886 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -92,7 +92,7 @@ void cmCTestMultiProcessHandler::RunTests() } this->TestHandler->SetMaxIndex(this->FindMaxIndex()); this->StartNextTests(); - while(this->Tests.size() != 0) + while(!this->Tests.empty()) { if(this->StopTimePassed) { diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index b6b0357..2896a50 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -668,7 +668,7 @@ void cmCTestTestHandler::PrintLabelSummary() for(; it != this->TestList.end(); ++it) { cmCTestTestProperties& p = *it; - if(p.Labels.size() != 0) + if(!p.Labels.empty()) { for(std::vector<std::string>::iterator l = p.Labels.begin(); l != p.Labels.end(); ++l) @@ -688,7 +688,7 @@ void cmCTestTestHandler::PrintLabelSummary() { cmCTestTestResult &result = *ri; cmCTestTestProperties& p = *result.Properties; - if(p.Labels.size() != 0) + if(!p.Labels.empty()) { for(std::vector<std::string>::iterator l = p.Labels.begin(); l != p.Labels.end(); ++l) diff --git a/Source/cmAuxSourceDirectoryCommand.cxx b/Source/cmAuxSourceDirectoryCommand.cxx index d8c3c43..a30d992 100644 --- a/Source/cmAuxSourceDirectoryCommand.cxx +++ b/Source/cmAuxSourceDirectoryCommand.cxx @@ -61,7 +61,7 @@ bool cmAuxSourceDirectoryCommand::InitialPass std::string ext = file.substr(dotpos+1); std::string base = file.substr(0, dotpos); // Process only source files - if( base.size() != 0 + if(!base.empty() && std::find( this->Makefile->GetSourceExtensions().begin(), this->Makefile->GetSourceExtensions().end(), ext ) != this->Makefile->GetSourceExtensions().end() ) diff --git a/Source/cmFindPathCommand.cxx b/Source/cmFindPathCommand.cxx index f4cc4c2..1490710 100644 --- a/Source/cmFindPathCommand.cxx +++ b/Source/cmFindPathCommand.cxx @@ -48,7 +48,7 @@ bool cmFindPathCommand } std::string result = this->FindHeader(); - if(result.size() != 0) + if(!result.empty()) { this->Makefile->AddCacheDefinition (this->VariableName, result.c_str(), diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx index c82d278..01ae300 100644 --- a/Source/cmListCommand.cxx +++ b/Source/cmListCommand.cxx @@ -328,7 +328,7 @@ bool cmListCommand::HandleInsertCommand(std::vector<std::string> const& args) return false; } - if ( varArgsExpanded.size() != 0 ) + if (!varArgsExpanded.empty()) { size_t nitem = varArgsExpanded.size(); if ( item < 0 ) diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 8e060c4..c193f20 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1513,7 +1513,7 @@ cmTarget::AnalyzeLibDependenciesForVS6( const cmMakefile& mf ) { // skip zero size library entries, this may happen // if a variable expands to nothing. - if (lib->first.size() != 0) + if (!lib->first.empty()) { this->EmitForVS6( *lib, dep_map, done, visited, newLinkLibrariesForVS6 ); } @@ -1653,7 +1653,7 @@ void cmTarget::GatherDependenciesForVS6( const cmMakefile& mf, while( end != std::string::npos ) { std::string l = depline.substr( start, end-start ); - if( l.size() != 0 ) + if(!l.empty()) { if (l == "debug") { |