diff options
author | Brad King <brad.king@kitware.com> | 2017-08-25 15:25:40 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-08-25 15:26:24 (GMT) |
commit | ebe436eb97bf81704a1d0b074b3da4ac817f37d3 (patch) | |
tree | ae29917c18a9ef90b62da4f616fbf2e8e702fb68 /Source/cmProcessTools.cxx | |
parent | 53305ce5b067c4feaa91ffe0cc82b740af525b3f (diff) | |
parent | 5962db438939ef2754509b8578af1f845ec07dc8 (diff) | |
download | CMake-ebe436eb97bf81704a1d0b074b3da4ac817f37d3.zip CMake-ebe436eb97bf81704a1d0b074b3da4ac817f37d3.tar.gz CMake-ebe436eb97bf81704a1d0b074b3da4ac817f37d3.tar.bz2 |
Merge topic 'cxx11-nullptr'
5962db43 Use C++11 nullptr
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1175
Diffstat (limited to 'Source/cmProcessTools.cxx')
-rw-r--r-- | Source/cmProcessTools.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/cmProcessTools.cxx b/Source/cmProcessTools.cxx index de7b061..67b4a97 100644 --- a/Source/cmProcessTools.cxx +++ b/Source/cmProcessTools.cxx @@ -10,22 +10,22 @@ void cmProcessTools::RunProcess(struct cmsysProcess_s* cp, OutputParser* out, OutputParser* err, Encoding encoding) { cmsysProcess_Execute(cp); - char* data = CM_NULLPTR; + char* data = nullptr; int length = 0; int p; cmProcessOutput processOutput(encoding); std::string strdata; while ((out || err) && - (p = cmsysProcess_WaitForData(cp, &data, &length, CM_NULLPTR), p)) { + (p = cmsysProcess_WaitForData(cp, &data, &length, nullptr), p)) { if (out && p == cmsysProcess_Pipe_STDOUT) { processOutput.DecodeText(data, length, strdata, 1); if (!out->Process(strdata.c_str(), int(strdata.size()))) { - out = CM_NULLPTR; + out = nullptr; } } else if (err && p == cmsysProcess_Pipe_STDERR) { processOutput.DecodeText(data, length, strdata, 2); if (!err->Process(strdata.c_str(), int(strdata.size()))) { - err = CM_NULLPTR; + err = nullptr; } } } @@ -41,12 +41,12 @@ void cmProcessTools::RunProcess(struct cmsysProcess_s* cp, OutputParser* out, out->Process(strdata.c_str(), int(strdata.size())); } } - cmsysProcess_WaitForExit(cp, CM_NULLPTR); + cmsysProcess_WaitForExit(cp, nullptr); } cmProcessTools::LineParser::LineParser(char sep, bool ignoreCR) - : Log(CM_NULLPTR) - , Prefix(CM_NULLPTR) + : Log(nullptr) + , Prefix(nullptr) , Separator(sep) , LineEnd('\0') , IgnoreCR(ignoreCR) |