Replace 'foo.size() != 0' pattern with !foo.empty().
This commit is contained in:
parent
930bd47816
commit
607e19384f
|
@ -92,7 +92,7 @@ void cmCTestMultiProcessHandler::RunTests()
|
||||||
}
|
}
|
||||||
this->TestHandler->SetMaxIndex(this->FindMaxIndex());
|
this->TestHandler->SetMaxIndex(this->FindMaxIndex());
|
||||||
this->StartNextTests();
|
this->StartNextTests();
|
||||||
while(this->Tests.size() != 0)
|
while(!this->Tests.empty())
|
||||||
{
|
{
|
||||||
if(this->StopTimePassed)
|
if(this->StopTimePassed)
|
||||||
{
|
{
|
||||||
|
|
|
@ -668,7 +668,7 @@ void cmCTestTestHandler::PrintLabelSummary()
|
||||||
for(; it != this->TestList.end(); ++it)
|
for(; it != this->TestList.end(); ++it)
|
||||||
{
|
{
|
||||||
cmCTestTestProperties& p = *it;
|
cmCTestTestProperties& p = *it;
|
||||||
if(p.Labels.size() != 0)
|
if(!p.Labels.empty())
|
||||||
{
|
{
|
||||||
for(std::vector<std::string>::iterator l = p.Labels.begin();
|
for(std::vector<std::string>::iterator l = p.Labels.begin();
|
||||||
l != p.Labels.end(); ++l)
|
l != p.Labels.end(); ++l)
|
||||||
|
@ -688,7 +688,7 @@ void cmCTestTestHandler::PrintLabelSummary()
|
||||||
{
|
{
|
||||||
cmCTestTestResult &result = *ri;
|
cmCTestTestResult &result = *ri;
|
||||||
cmCTestTestProperties& p = *result.Properties;
|
cmCTestTestProperties& p = *result.Properties;
|
||||||
if(p.Labels.size() != 0)
|
if(!p.Labels.empty())
|
||||||
{
|
{
|
||||||
for(std::vector<std::string>::iterator l = p.Labels.begin();
|
for(std::vector<std::string>::iterator l = p.Labels.begin();
|
||||||
l != p.Labels.end(); ++l)
|
l != p.Labels.end(); ++l)
|
||||||
|
|
|
@ -61,7 +61,7 @@ bool cmAuxSourceDirectoryCommand::InitialPass
|
||||||
std::string ext = file.substr(dotpos+1);
|
std::string ext = file.substr(dotpos+1);
|
||||||
std::string base = file.substr(0, dotpos);
|
std::string base = file.substr(0, dotpos);
|
||||||
// Process only source files
|
// Process only source files
|
||||||
if( base.size() != 0
|
if(!base.empty()
|
||||||
&& std::find( this->Makefile->GetSourceExtensions().begin(),
|
&& std::find( this->Makefile->GetSourceExtensions().begin(),
|
||||||
this->Makefile->GetSourceExtensions().end(), ext )
|
this->Makefile->GetSourceExtensions().end(), ext )
|
||||||
!= this->Makefile->GetSourceExtensions().end() )
|
!= this->Makefile->GetSourceExtensions().end() )
|
||||||
|
|
|
@ -48,7 +48,7 @@ bool cmFindPathCommand
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string result = this->FindHeader();
|
std::string result = this->FindHeader();
|
||||||
if(result.size() != 0)
|
if(!result.empty())
|
||||||
{
|
{
|
||||||
this->Makefile->AddCacheDefinition
|
this->Makefile->AddCacheDefinition
|
||||||
(this->VariableName, result.c_str(),
|
(this->VariableName, result.c_str(),
|
||||||
|
|
|
@ -328,7 +328,7 @@ bool cmListCommand::HandleInsertCommand(std::vector<std::string> const& args)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( varArgsExpanded.size() != 0 )
|
if (!varArgsExpanded.empty())
|
||||||
{
|
{
|
||||||
size_t nitem = varArgsExpanded.size();
|
size_t nitem = varArgsExpanded.size();
|
||||||
if ( item < 0 )
|
if ( item < 0 )
|
||||||
|
|
|
@ -1513,7 +1513,7 @@ cmTarget::AnalyzeLibDependenciesForVS6( const cmMakefile& mf )
|
||||||
{
|
{
|
||||||
// skip zero size library entries, this may happen
|
// skip zero size library entries, this may happen
|
||||||
// if a variable expands to nothing.
|
// if a variable expands to nothing.
|
||||||
if (lib->first.size() != 0)
|
if (!lib->first.empty())
|
||||||
{
|
{
|
||||||
this->EmitForVS6( *lib, dep_map, done, visited, newLinkLibrariesForVS6 );
|
this->EmitForVS6( *lib, dep_map, done, visited, newLinkLibrariesForVS6 );
|
||||||
}
|
}
|
||||||
|
@ -1653,7 +1653,7 @@ void cmTarget::GatherDependenciesForVS6( const cmMakefile& mf,
|
||||||
while( end != std::string::npos )
|
while( end != std::string::npos )
|
||||||
{
|
{
|
||||||
std::string l = depline.substr( start, end-start );
|
std::string l = depline.substr( start, end-start );
|
||||||
if( l.size() != 0 )
|
if(!l.empty())
|
||||||
{
|
{
|
||||||
if (l == "debug")
|
if (l == "debug")
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue