Use the same internal data type for conversion function

This commit is contained in:
Chocobo1
2019-09-23 12:58:51 +08:00
parent ed62854af7
commit 72faf89e26
2 changed files with 5 additions and 5 deletions

View File

@@ -43,13 +43,13 @@ public:
*this = boolean ? True : False;
}
explicit constexpr operator int() const
TriStateBool &operator=(const TriStateBool &other) = default; // TODO: add constexpr when using C++17
explicit constexpr operator signed char() const
{
return m_value;
}
TriStateBool &operator=(const TriStateBool &other) = default; // add constexpr when using C++17
constexpr friend bool operator==(const TriStateBool &left, const TriStateBool &right)
{
return (left.m_value == right.m_value);