From ec4d12f6a4d31b8214296689e81462efa983a302 Mon Sep 17 00:00:00 2001 From: Daniel Larimer Date: Mon, 12 Aug 2013 14:42:54 -0400 Subject: [PATCH] added additional operators --- include/fc/crypto/elliptic.hpp | 5 +++++ include/fc/time.hpp | 1 + 2 files changed, 6 insertions(+) diff --git a/include/fc/crypto/elliptic.hpp b/include/fc/crypto/elliptic.hpp index 128cd4e..a3a0736 100644 --- a/include/fc/crypto/elliptic.hpp +++ b/include/fc/crypto/elliptic.hpp @@ -41,6 +41,11 @@ namespace fc { public_key( public_key&& pk ); public_key& operator=( public_key&& pk ); public_key& operator=( const public_key& pk ); + + inline friend bool operator==( const public_key& a, const public_key& b ) + { + return a.serialize() == b.serialize(); + } private: friend class private_key; fc::fwd my; diff --git a/include/fc/time.hpp b/include/fc/time.hpp index 6df8e8d..85d0568 100644 --- a/include/fc/time.hpp +++ b/include/fc/time.hpp @@ -75,6 +75,7 @@ namespace fc { return *this; } friend bool operator < ( const time_point_sec& a, const time_point_sec& b ) { return a.utc_seconds < b.utc_seconds; } + friend bool operator > ( const time_point_sec& a, const time_point_sec& b ) { return a.utc_seconds > b.utc_seconds; } private: uint32_t utc_seconds;