diff options
-rw-r--r-- | gatoaddress.cpp | 5 | ||||
-rw-r--r-- | gatoaddress.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gatoaddress.cpp b/gatoaddress.cpp index df28eeb..3aeb355 100644 --- a/gatoaddress.cpp +++ b/gatoaddress.cpp @@ -79,6 +79,11 @@ GatoAddress & GatoAddress::operator =(const GatoAddress& o) return *this; } +bool GatoAddress::isNull() const +{ + return toUInt64() == 0; +} + quint64 GatoAddress::toUInt64() const { return d->addr.u64; diff --git a/gatoaddress.h b/gatoaddress.h index 2ae2cc0..9b551e7 100644 --- a/gatoaddress.h +++ b/gatoaddress.h @@ -19,6 +19,8 @@ public: GatoAddress& operator=(const GatoAddress& o); + bool isNull() const; + void toUInt8Array(quint8 addr[]) const; quint64 toUInt64() const; QString toString() const; |