diff options
author | Kitware Robot <kwrobot@kitware.com> | 2016-05-16 14:34:04 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-05-16 20:05:19 (GMT) |
commit | d9fd2f5402eeaa345691313658e02b51038f570b (patch) | |
tree | dca71b9a7e267f4c6300da3eb770415381726785 /Source/cmProcessTools.h | |
parent | 82df6deaafb36cbbfd450202bb20b320f637751a (diff) | |
download | CMake-d9fd2f5402eeaa345691313658e02b51038f570b.zip CMake-d9fd2f5402eeaa345691313658e02b51038f570b.tar.gz CMake-d9fd2f5402eeaa345691313658e02b51038f570b.tar.bz2 |
Revise C++ coding style using clang-format
Run the `Utilities/Scripts/clang-format.bash` script to update
all our C++ code to a new style defined by `.clang-format`.
Use `clang-format` version 3.8.
* If you reached this commit for a line in `git blame`, re-run the blame
operation starting at the parent of this commit to see older history
for the content.
* See the parent commit for instructions to rebase a change across this
style transition commit.
Diffstat (limited to 'Source/cmProcessTools.h')
-rw-r--r-- | Source/cmProcessTools.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/Source/cmProcessTools.h b/Source/cmProcessTools.h index 23833ca..a48e52b 100644 --- a/Source/cmProcessTools.h +++ b/Source/cmProcessTools.h @@ -29,9 +29,13 @@ public: done incrementally. Returns true if the parser is interested in any more data and false if it is done. */ bool Process(const char* data, int length) - { return this->ProcessChunk(data, length); } + { + return this->ProcessChunk(data, length); + } bool Process(const char* data) - { return this->Process(data, static_cast<int>(strlen(data))); } + { + return this->Process(data, static_cast<int>(strlen(data))); + } virtual ~OutputParser() {} protected: @@ -41,7 +45,7 @@ public: }; /** Process output parser that extracts one line at a time. */ - class LineParser: public OutputParser + class LineParser : public OutputParser { public: /** Construct with line separation character and choose whether to @@ -50,6 +54,7 @@ public: /** Configure logging of lines as they are extracted. */ void SetLog(std::ostream* log, const char* prefix); + protected: std::ostream* Log; const char* Prefix; @@ -65,18 +70,21 @@ public: }; /** Trivial line handler for simple logging. */ - class OutputLogger: public LineParser + class OutputLogger : public LineParser { public: OutputLogger(std::ostream& log, const char* prefix = 0) - { this->SetLog(&log, prefix); } + { + this->SetLog(&log, prefix); + } + private: virtual bool ProcessLine() { return true; } }; /** Run a process and send output to given parsers. */ - static void RunProcess(struct cmsysProcess_s* cp, - OutputParser* out, OutputParser* err = 0); + static void RunProcess(struct cmsysProcess_s* cp, OutputParser* out, + OutputParser* err = 0); }; #endif |