Skip to content

Commit

Permalink
Merge pull request #4636 from lioncash/file
Browse files Browse the repository at this point in the history
IOFile: Correct explicit operator bool semantics
  • Loading branch information
delroth committed Jan 9, 2017
2 parents 0869c63 + 1dab2c8 commit 9104417
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Core/Common/FileUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ class IOFile : public NonCopyable
bool IsOpen() const { return nullptr != m_file; }
// m_good is set to false when a read, write or other function fails
bool IsGood() const { return m_good; }
explicit operator bool() const { return IsGood(); }
explicit operator bool() const { return IsGood() && IsOpen(); }
std::FILE* ReleaseHandle();

std::FILE* GetHandle() { return m_file; }
Expand Down

0 comments on commit 9104417

Please sign in to comment.