summaryrefslogtreecommitdiffstats
path: root/Source/cmExecProgramCommand.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-01-14 23:06:11 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-01-18 13:25:24 (GMT)
commitd92887efabad6a91e221588d0dc7a0bffd91a9f7 (patch)
tree0436e742b7efd6071e01879b90fd71d5890d8b1c /Source/cmExecProgramCommand.cxx
parentf3e92d281682ee482b1425675b9fccd372cd01f3 (diff)
downloadCMake-d92887efabad6a91e221588d0dc7a0bffd91a9f7.zip
CMake-d92887efabad6a91e221588d0dc7a0bffd91a9f7.tar.gz
CMake-d92887efabad6a91e221588d0dc7a0bffd91a9f7.tar.bz2
Replace 'foo.size() > 0' pattern with !foo.empty().
Diffstat (limited to 'Source/cmExecProgramCommand.cxx')
-rw-r--r--Source/cmExecProgramCommand.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmExecProgramCommand.cxx b/Source/cmExecProgramCommand.cxx
index 9b59088..3828468 100644
--- a/Source/cmExecProgramCommand.cxx
+++ b/Source/cmExecProgramCommand.cxx
@@ -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);