mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-22 14:23:10 -05:00
Replace 'foo.size() > 0' pattern with !foo.empty().
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user