diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-06-01 21:29:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-06-02 12:24:04 (GMT) |
commit | 7f6b8d3399dd841b0d29bf74d2b31021738c4ef8 (patch) | |
tree | 9b9184028cba2f16fdcc1c10ac5fb5467f09bff7 /Source/cmGeneratedFileStream.cxx | |
parent | d6754d37d593a0189809dcf98bc4fdf3a609f0a3 (diff) | |
download | CMake-7f6b8d3399dd841b0d29bf74d2b31021738c4ef8.zip CMake-7f6b8d3399dd841b0d29bf74d2b31021738c4ef8.tar.gz CMake-7f6b8d3399dd841b0d29bf74d2b31021738c4ef8.tar.bz2 |
Simplify boolean expressions
Use clang-tidy's readability-simplify-boolean-expr checker.
After applying the fix-its, revise all changes *very* carefully.
Be aware of false positives and invalid changes.
Diffstat (limited to 'Source/cmGeneratedFileStream.cxx')
-rw-r--r-- | Source/cmGeneratedFileStream.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmGeneratedFileStream.cxx b/Source/cmGeneratedFileStream.cxx index 2c05913..dee174b 100644 --- a/Source/cmGeneratedFileStream.cxx +++ b/Source/cmGeneratedFileStream.cxx @@ -42,7 +42,7 @@ cmGeneratedFileStream::~cmGeneratedFileStream() // stream will be destroyed which will close the temporary file. // Finally the base destructor will be called to replace the // destination file. - this->Okay = (*this) ? true : false; + this->Okay = !this->fail(); } cmGeneratedFileStream& cmGeneratedFileStream::Open(const char* name, @@ -71,7 +71,7 @@ cmGeneratedFileStream& cmGeneratedFileStream::Open(const char* name, bool cmGeneratedFileStream::Close() { // Save whether the temporary output file is valid before closing. - this->Okay = (*this) ? true : false; + this->Okay = !this->fail(); // Close the temporary output file. this->Stream::close(); |