diff options
author | Javier <maemo@javispedro.com> | 2014-05-13 01:13:53 +0200 |
---|---|---|
committer | Javier <maemo@javispedro.com> | 2014-05-13 01:13:53 +0200 |
commit | 6163f146b2951c492de312365161b8a0f9d1afd1 (patch) | |
tree | 664af28b18d186c94585926a564ae2381aba4e9e | |
parent | 995317cbc86e53fd02d0b7ddbc56fa950eec4365 (diff) | |
download | libgato-6163f146b2951c492de312365161b8a0f9d1afd1.tar.gz libgato-6163f146b2951c492de312365161b8a0f9d1afd1.zip |
add GatoAddress::isNull()
-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; |