timestamp: Implement operator!= in terms of operator==

Same behavior, less code.
This commit is contained in:
Lioncash 2020-06-23 06:20:27 -04:00
parent 3ca9d578b3
commit 987b11a1d2

View file

@ -216,11 +216,7 @@ bool Timestamp::operator==(const Timestamp& other) const
bool Timestamp::operator!=(const Timestamp& other) const bool Timestamp::operator!=(const Timestamp& other) const
{ {
#if defined(WIN32) return !operator==(other);
return std::memcmp(&m_value, &other.m_value, sizeof(m_value)) != 0;
#else
return std::memcmp(&m_value, &other.m_value, sizeof(m_value)) != 0;
#endif
} }
bool Timestamp::operator<(const Timestamp& other) const bool Timestamp::operator<(const Timestamp& other) const