From b9dba97fdb8644e3c427b079d81ed9db3697bf1b Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Tue, 26 Apr 2016 17:11:25 -0700 Subject: Bunch more refactoring for an even more compact NetworkConfig representation, especially rules. --- node/Address.hpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'node/Address.hpp') diff --git a/node/Address.hpp b/node/Address.hpp index db46a4c9..9bf5605a 100644 --- a/node/Address.hpp +++ b/node/Address.hpp @@ -216,6 +216,13 @@ public: */ inline unsigned char operator[](unsigned int i) const throw() { return (unsigned char)((_a >> (32 - (i * 8))) & 0xff); } + inline bool operator==(const uint64_t &a) const throw() { return (_a == (a & 0xffffffffffULL)); } + inline bool operator!=(const uint64_t &a) const throw() { return (_a != (a & 0xffffffffffULL)); } + inline bool operator>(const uint64_t &a) const throw() { return (_a > (a & 0xffffffffffULL)); } + inline bool operator<(const uint64_t &a) const throw() { return (_a < (a & 0xffffffffffULL)); } + inline bool operator>=(const uint64_t &a) const throw() { return (_a >= (a & 0xffffffffffULL)); } + inline bool operator<=(const uint64_t &a) const throw() { return (_a <= (a & 0xffffffffffULL)); } + inline bool operator==(const Address &a) const throw() { return (_a == a._a); } inline bool operator!=(const Address &a) const throw() { return (_a != a._a); } inline bool operator>(const Address &a) const throw() { return (_a > a._a); } -- cgit v1.2.3