summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratedFileStream.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGeneratedFileStream.cxx')
-rw-r--r--Source/cmGeneratedFileStream.cxx4
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();