diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-05-26 20:52:22 (GMT) |
---|---|---|
committer | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-05-26 20:52:22 (GMT) |
commit | 1b2bb93302116a4791cf82e9cce028dfe87ef55d (patch) | |
tree | b20aead9b34d9bdba3243439dd8f0aed032727e2 /Source/CTest/cmCTestMemCheckHandler.cxx | |
parent | acd8a73044e879286f0cfa24b54497a8307f204b (diff) | |
download | CMake-1b2bb93302116a4791cf82e9cce028dfe87ef55d.zip CMake-1b2bb93302116a4791cf82e9cce028dfe87ef55d.tar.gz CMake-1b2bb93302116a4791cf82e9cce028dfe87ef55d.tar.bz2 |
Remove redundant c_str() calls.
Run clang-tidy's readability-redundant-string-cstr checker.
Ignore findings in kwsys.
Diffstat (limited to 'Source/CTest/cmCTestMemCheckHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestMemCheckHandler.cxx | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx index 2cbd64d..5ae98af 100644 --- a/Source/CTest/cmCTestMemCheckHandler.cxx +++ b/Source/CTest/cmCTestMemCheckHandler.cxx @@ -422,7 +422,7 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking() if (cmSystemTools::FileExists( this->CTest->GetCTestConfiguration("MemoryCheckCommand").c_str())) { this->MemoryTester = - this->CTest->GetCTestConfiguration("MemoryCheckCommand").c_str(); + this->CTest->GetCTestConfiguration("MemoryCheckCommand"); std::string testerName = cmSystemTools::GetFilenameName(this->MemoryTester); // determine the checker type @@ -438,47 +438,41 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking() } } else if (cmSystemTools::FileExists( this->CTest->GetCTestConfiguration("PurifyCommand").c_str())) { - this->MemoryTester = - this->CTest->GetCTestConfiguration("PurifyCommand").c_str(); + this->MemoryTester = this->CTest->GetCTestConfiguration("PurifyCommand"); this->MemoryTesterStyle = cmCTestMemCheckHandler::PURIFY; } else if (cmSystemTools::FileExists( this->CTest->GetCTestConfiguration("ValgrindCommand") .c_str())) { - this->MemoryTester = - this->CTest->GetCTestConfiguration("ValgrindCommand").c_str(); + this->MemoryTester = this->CTest->GetCTestConfiguration("ValgrindCommand"); this->MemoryTesterStyle = cmCTestMemCheckHandler::VALGRIND; } else if (cmSystemTools::FileExists( this->CTest->GetCTestConfiguration("BoundsCheckerCommand") .c_str())) { this->MemoryTester = - this->CTest->GetCTestConfiguration("BoundsCheckerCommand").c_str(); + this->CTest->GetCTestConfiguration("BoundsCheckerCommand"); this->MemoryTesterStyle = cmCTestMemCheckHandler::BOUNDS_CHECKER; } if (this->CTest->GetCTestConfiguration("MemoryCheckType") == "AddressSanitizer") { - this->MemoryTester = - this->CTest->GetCTestConfiguration("CMakeCommand").c_str(); + this->MemoryTester = this->CTest->GetCTestConfiguration("CMakeCommand"); this->MemoryTesterStyle = cmCTestMemCheckHandler::ADDRESS_SANITIZER; this->LogWithPID = true; // even if we give the log file the pid is added } if (this->CTest->GetCTestConfiguration("MemoryCheckType") == "ThreadSanitizer") { - this->MemoryTester = - this->CTest->GetCTestConfiguration("CMakeCommand").c_str(); + this->MemoryTester = this->CTest->GetCTestConfiguration("CMakeCommand"); this->MemoryTesterStyle = cmCTestMemCheckHandler::THREAD_SANITIZER; this->LogWithPID = true; // even if we give the log file the pid is added } if (this->CTest->GetCTestConfiguration("MemoryCheckType") == "MemorySanitizer") { - this->MemoryTester = - this->CTest->GetCTestConfiguration("CMakeCommand").c_str(); + this->MemoryTester = this->CTest->GetCTestConfiguration("CMakeCommand"); this->MemoryTesterStyle = cmCTestMemCheckHandler::MEMORY_SANITIZER; this->LogWithPID = true; // even if we give the log file the pid is added } if (this->CTest->GetCTestConfiguration("MemoryCheckType") == "UndefinedBehaviorSanitizer") { - this->MemoryTester = - this->CTest->GetCTestConfiguration("CMakeCommand").c_str(); + this->MemoryTester = this->CTest->GetCTestConfiguration("CMakeCommand"); this->MemoryTesterStyle = cmCTestMemCheckHandler::UB_SANITIZER; this->LogWithPID = true; // even if we give the log file the pid is added } |