summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.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/cmCTest.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/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 76873ad..944d506 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -872,7 +872,7 @@ bool cmCTest::OpenOutputFile(const std::string& path,
bool compress)
{
std::string testingDir = this->BinaryDir + "/Testing";
- if ( path.size() > 0 )
+ if (!path.empty())
{
testingDir += "/" + path;
}
@@ -1067,7 +1067,7 @@ int cmCTest::ProcessTests()
if ( cmSystemTools::FileExists(fullname.c_str()) &&
!cmSystemTools::FileIsDirectory(fullname) )
{
- if ( this->NotesFiles.size() > 0 )
+ if (!this->NotesFiles.empty())
{
this->NotesFiles += ";";
}
@@ -1266,7 +1266,7 @@ int cmCTest::RunTest(std::vector<const char*> argv,
std::ostream* log, double testTimeOut,
std::vector<std::string>* environment)
{
- bool modifyEnv = (environment && environment->size()>0);
+ bool modifyEnv = (environment && !environment->empty());
// determine how much time we have
double timeout = this->GetRemainingTimeAllowed() - 120;
@@ -2936,11 +2936,11 @@ bool cmCTest::RunCommand(
}
cmsysProcess_WaitForExit(cp, 0);
- if ( tempOutput.size() > 0 )
+ if (!tempOutput.empty())
{
stdOut->append(&*tempOutput.begin(), tempOutput.size());
}
- if ( tempError.size() > 0 )
+ if (!tempError.empty())
{
stdErr->append(&*tempError.begin(), tempError.size());
}