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

This commit is contained in:
Stephen Kelly
2015-01-15 00:06:11 +01:00
parent f3e92d2816
commit d92887efab
32 changed files with 83 additions and 83 deletions
+5 -5
View File
@@ -41,7 +41,7 @@ bool cmExecProgramCommand
}
else if ( haveoutput_variable )
{
if ( output_variable.size() > 0 )
if (!output_variable.empty())
{
this->SetError("called with incorrect number of arguments");
return false;
@@ -59,7 +59,7 @@ bool cmExecProgramCommand
}
else if ( havereturn_variable )
{
if ( return_variable.size() > 0 )
if (!return_variable.empty())
{
this->SetError("called with incorrect number of arguments");
return false;
@@ -95,7 +95,7 @@ bool cmExecProgramCommand
command = args[0];
}
bool verbose = true;
if(output_variable.size() > 0)
if(!output_variable.empty())
{
verbose = false;
}
@@ -118,7 +118,7 @@ bool cmExecProgramCommand
retVal = -1;
}
if ( output_variable.size() > 0 )
if (!output_variable.empty())
{
std::string::size_type first = output.find_first_not_of(" \n\t\r");
std::string::size_type last = output.find_last_not_of(" \n\t\r");
@@ -135,7 +135,7 @@ bool cmExecProgramCommand
this->Makefile->AddDefinition(output_variable, coutput.c_str());
}
if ( return_variable.size() > 0 )
if (!return_variable.empty())
{
char buffer[100];
sprintf(buffer, "%d", retVal);