diff --git a/Source/Core/Common/FileUtil.h b/Source/Core/Common/FileUtil.h index c8524254c2..445c7fc0f4 100644 --- a/Source/Core/Common/FileUtil.h +++ b/Source/Core/Common/FileUtil.h @@ -211,7 +211,7 @@ public: 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; } - operator void*() { return m_good ? m_file : nullptr; } + explicit operator bool() const { return IsGood(); } std::FILE* ReleaseHandle(); std::FILE* GetHandle() { return m_file; }