From 987b11a1d295c28f59e350553faedbae55d7fa3a Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 23 Jun 2020 06:20:27 -0400 Subject: [PATCH] timestamp: Implement operator!= in terms of operator== Same behavior, less code. --- src/common/timestamp.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/common/timestamp.cpp b/src/common/timestamp.cpp index 7a8cba19d..45e9e55b8 100644 --- a/src/common/timestamp.cpp +++ b/src/common/timestamp.cpp @@ -216,11 +216,7 @@ bool Timestamp::operator==(const Timestamp& other) const bool Timestamp::operator!=(const Timestamp& other) const { -#if defined(WIN32) - 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 + return !operator==(other); } bool Timestamp::operator<(const Timestamp& other) const