diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-06-01 21:29:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-06-02 12:24:04 (GMT) |
commit | 7f6b8d3399dd841b0d29bf74d2b31021738c4ef8 (patch) | |
tree | 9b9184028cba2f16fdcc1c10ac5fb5467f09bff7 /Source/CTest/cmCTestMemCheckHandler.cxx | |
parent | d6754d37d593a0189809dcf98bc4fdf3a609f0a3 (diff) | |
download | CMake-7f6b8d3399dd841b0d29bf74d2b31021738c4ef8.zip CMake-7f6b8d3399dd841b0d29bf74d2b31021738c4ef8.tar.gz CMake-7f6b8d3399dd841b0d29bf74d2b31021738c4ef8.tar.bz2 |
Simplify boolean expressions
Use clang-tidy's readability-simplify-boolean-expr checker.
After applying the fix-its, revise all changes *very* carefully.
Be aware of false positives and invalid changes.
Diffstat (limited to 'Source/CTest/cmCTestMemCheckHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestMemCheckHandler.cxx | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx index 5ae98af..f8ffd43 100644 --- a/Source/CTest/cmCTestMemCheckHandler.cxx +++ b/Source/CTest/cmCTestMemCheckHandler.cxx @@ -722,10 +722,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckSanitizerOutput( ostr << *i << std::endl; } log = ostr.str(); - if (defects) { - return false; - } - return true; + return defects == 0; } bool cmCTestMemCheckHandler::ProcessMemCheckPurifyOutput( const std::string& str, std::string& log, std::vector<int>& results) @@ -766,10 +763,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckPurifyOutput( } log = ostr.str(); - if (defects) { - return false; - } - return true; + return defects == 0; } bool cmCTestMemCheckHandler::ProcessMemCheckValgrindOutput( @@ -904,10 +898,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckValgrindOutput( << (cmSystemTools::GetTime() - sttime) << std::endl, this->Quiet); log = ostr.str(); - if (defects) { - return false; - } - return true; + return defects == 0; } bool cmCTestMemCheckHandler::ProcessMemCheckBoundsCheckerOutput( |