diff options
author | Brad King <brad.king@kitware.com> | 2016-08-23 13:00:00 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-08-23 13:00:00 (GMT) |
commit | 797f7ad87d6f1b6dd7cbbb553d5525ac8ee390f1 (patch) | |
tree | f5922b06caf987f6faff13f8c2ba8e0f164457f6 /Source/CTest/cmCTestMemCheckHandler.cxx | |
parent | 762131fe8d585ced6b259a451ccde8fded2a8ca4 (diff) | |
parent | 7b6349da4dc968691f1a374211fcc153c8b4f1c6 (diff) | |
download | CMake-797f7ad87d6f1b6dd7cbbb553d5525ac8ee390f1.zip CMake-797f7ad87d6f1b6dd7cbbb553d5525ac8ee390f1.tar.gz CMake-797f7ad87d6f1b6dd7cbbb553d5525ac8ee390f1.tar.bz2 |
Merge topic 'else-after-return'
7b6349da CMake: don't use else after return
50ad1e0a CTest: don't use else after return
7f97a6c9 CPack: don't use else after return
4988b914 CursesDialog: don't use else after return
Diffstat (limited to 'Source/CTest/cmCTestMemCheckHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestMemCheckHandler.cxx | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx index a06c351..7d0715f 100644 --- a/Source/CTest/cmCTestMemCheckHandler.cxx +++ b/Source/CTest/cmCTestMemCheckHandler.cxx @@ -638,27 +638,24 @@ bool cmCTestMemCheckHandler::ProcessMemCheckOutput(const std::string& str, std::string& log, std::vector<int>& results) { - if (this->MemoryTesterStyle == cmCTestMemCheckHandler::VALGRIND) { - return this->ProcessMemCheckValgrindOutput(str, log, results); - } else if (this->MemoryTesterStyle == cmCTestMemCheckHandler::PURIFY) { - return this->ProcessMemCheckPurifyOutput(str, log, results); - } else if (this->MemoryTesterStyle == - cmCTestMemCheckHandler::ADDRESS_SANITIZER || - this->MemoryTesterStyle == - cmCTestMemCheckHandler::THREAD_SANITIZER || - this->MemoryTesterStyle == - cmCTestMemCheckHandler::MEMORY_SANITIZER || - this->MemoryTesterStyle == cmCTestMemCheckHandler::UB_SANITIZER) { - return this->ProcessMemCheckSanitizerOutput(str, log, results); - } else if (this->MemoryTesterStyle == - cmCTestMemCheckHandler::BOUNDS_CHECKER) { - return this->ProcessMemCheckBoundsCheckerOutput(str, log, results); - } else { - log.append("\nMemory checking style used was: "); - log.append("None that I know"); - log = str; + switch (this->MemoryTesterStyle) { + case cmCTestMemCheckHandler::VALGRIND: + return this->ProcessMemCheckValgrindOutput(str, log, results); + case cmCTestMemCheckHandler::PURIFY: + return this->ProcessMemCheckPurifyOutput(str, log, results); + case cmCTestMemCheckHandler::ADDRESS_SANITIZER: + case cmCTestMemCheckHandler::THREAD_SANITIZER: + case cmCTestMemCheckHandler::MEMORY_SANITIZER: + case cmCTestMemCheckHandler::UB_SANITIZER: + return this->ProcessMemCheckSanitizerOutput(str, log, results); + case cmCTestMemCheckHandler::BOUNDS_CHECKER: + return this->ProcessMemCheckBoundsCheckerOutput(str, log, results); + default: + log.append("\nMemory checking style used was: "); + log.append("None that I know"); + log = str; + return true; } - return true; } std::vector<int>::size_type cmCTestMemCheckHandler::FindOrAddWarning( |