diff options
Diffstat (limited to 'Source/CTest/cmCTestLaunch.cxx')
-rw-r--r-- | Source/CTest/cmCTestLaunch.cxx | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/Source/CTest/cmCTestLaunch.cxx b/Source/CTest/cmCTestLaunch.cxx index 4a408a2..3eed79e 100644 --- a/Source/CTest/cmCTestLaunch.cxx +++ b/Source/CTest/cmCTestLaunch.cxx @@ -30,7 +30,7 @@ cmCTestLaunch::cmCTestLaunch(int argc, const char* const* argv) { this->Passthru = true; - this->Process = 0; + this->Process = CM_NULLPTR; this->ExitCode = 1; this->CWD = cmSystemTools::GetCurrentWorkingDirectory(); @@ -128,7 +128,7 @@ bool cmCTestLaunch::ParseArguments(int argc, const char* const* argv) return true; } else { this->RealArgC = 0; - this->RealArgV = 0; + this->RealArgV = CM_NULLPTR; std::cerr << "No launch/command separator ('--') found!\n"; return false; } @@ -227,9 +227,9 @@ void cmCTestLaunch::RunChild() // Record child stdout and stderr if necessary. if (!this->Passthru) { - char* data = 0; + char* data = CM_NULLPTR; int length = 0; - while (int p = cmsysProcess_WaitForData(cp, &data, &length, 0)) { + while (int p = cmsysProcess_WaitForData(cp, &data, &length, CM_NULLPTR)) { if (p == cmsysProcess_Pipe_STDOUT) { fout.write(data, length); std::cout.write(data, length); @@ -243,7 +243,7 @@ void cmCTestLaunch::RunChild() } // Wait for the real command to finish. - cmsysProcess_WaitForExit(cp, 0); + cmsysProcess_WaitForExit(cp, CM_NULLPTR); this->ExitCode = cmsysProcess_GetExitValue(cp); } @@ -384,7 +384,7 @@ void cmCTestLaunch::WriteXMLAction(cmXMLWriter& xml) } // OutputType - const char* outputType = 0; + const char* outputType = CM_NULLPTR; if (!this->OptionTargetType.empty()) { if (this->OptionTargetType == "EXECUTABLE") { outputType = "executable"; @@ -594,12 +594,8 @@ bool cmCTestLaunch::Match(std::string const& line, bool cmCTestLaunch::MatchesFilterPrefix(std::string const& line) const { - if (!this->OptionFilterPrefix.empty() && - cmSystemTools::StringStartsWith(line.c_str(), - this->OptionFilterPrefix.c_str())) { - return true; - } - return false; + return !this->OptionFilterPrefix.empty() && + cmSystemTools::StringStartsWith(line, this->OptionFilterPrefix.c_str()); } int cmCTestLaunch::Main(int argc, const char* const argv[]) @@ -616,7 +612,7 @@ int cmCTestLaunch::Main(int argc, const char* const argv[]) #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmake.h" -#include <cmsys/auto_ptr.hxx> +#include <cm_auto_ptr.hxx> void cmCTestLaunch::LoadConfig() { cmake cm; @@ -624,7 +620,7 @@ void cmCTestLaunch::LoadConfig() cm.SetHomeOutputDirectory(""); cm.GetCurrentSnapshot().SetDefaultDefinitions(); cmGlobalGenerator gg(&cm); - cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(&gg, cm.GetCurrentSnapshot())); + CM_AUTO_PTR<cmMakefile> mf(new cmMakefile(&gg, cm.GetCurrentSnapshot())); std::string fname = this->LogDir; fname += "CTestLaunchConfig.cmake"; if (cmSystemTools::FileExists(fname.c_str()) && |