Skip to content

Commit

Permalink
+file_ptr fix not operator
Browse files Browse the repository at this point in the history
  • Loading branch information
martysama0134 committed Aug 15, 2018
1 parent eaa53b3 commit 9e135db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/msl/file_ptr.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ class file_ptr
//! @brief *ptr
std::FILE * operator*() const { return m_ptr; }
//! @brief if (!ptr)
bool operator!() const { return is_open(); }
bool operator!() const { return !m_ptr; }
//! @brief ptr->elem
std::FILE * operator->() const { return m_ptr; }
//! @brief if (ptr)
operator bool() const { return get(); }
operator bool() const { return m_ptr; }

//! @brief get the file ptr
std::FILE * get() const { return m_ptr; }
Expand Down

0 comments on commit 9e135db

Please sign in to comment.