summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestMemCheckHandler.cxx
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-05-26 21:05:30 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2016-06-02 19:35:50 (GMT)
commitc6220de27605f33b2793729680c32714cd126690 (patch)
treeedd5725b84c0d2ed910b9ec945d3086f5324f9aa /Source/CTest/cmCTestMemCheckHandler.cxx
parent9ca8c7a99f193179ebfc893060966c37e3efabca (diff)
downloadCMake-c6220de27605f33b2793729680c32714cd126690.zip
CMake-c6220de27605f33b2793729680c32714cd126690.tar.gz
CMake-c6220de27605f33b2793729680c32714cd126690.tar.bz2
Use the empty() method to check for emptyness.
Apply fix-its from clang-tidy's readability-container-size-empty checker.
Diffstat (limited to 'Source/CTest/cmCTestMemCheckHandler.cxx')
-rw-r--r--Source/CTest/cmCTestMemCheckHandler.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx
index 5ae98af..f9f7ab7 100644
--- a/Source/CTest/cmCTestMemCheckHandler.cxx
+++ b/Source/CTest/cmCTestMemCheckHandler.cxx
@@ -499,11 +499,12 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
// Setup the options
std::string memoryTesterOptions;
- if (this->CTest->GetCTestConfiguration("MemoryCheckCommandOptions").size()) {
+ if (!this->CTest->GetCTestConfiguration("MemoryCheckCommandOptions")
+ .empty()) {
memoryTesterOptions =
this->CTest->GetCTestConfiguration("MemoryCheckCommandOptions");
- } else if (this->CTest->GetCTestConfiguration("ValgrindCommandOptions")
- .size()) {
+ } else if (!this->CTest->GetCTestConfiguration("ValgrindCommandOptions")
+ .empty()) {
memoryTesterOptions =
this->CTest->GetCTestConfiguration("ValgrindCommandOptions");
}
@@ -522,8 +523,8 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
this->MemoryTesterOptions.push_back("--show-reachable=yes");
this->MemoryTesterOptions.push_back("--num-callers=50");
}
- if (this->CTest->GetCTestConfiguration("MemoryCheckSuppressionFile")
- .size()) {
+ if (!this->CTest->GetCTestConfiguration("MemoryCheckSuppressionFile")
+ .empty()) {
if (!cmSystemTools::FileExists(
this->CTest->GetCTestConfiguration("MemoryCheckSuppressionFile")
.c_str())) {