diff --git a/src/core/model/int64x64-128.h b/src/core/model/int64x64-128.h index 2214992a4..4f7ee95a4 100644 --- a/src/core/model/int64x64-128.h +++ b/src/core/model/int64x64-128.h @@ -217,6 +217,12 @@ public: return *this; } + /** Explicit bool conversion. */ + inline explicit operator bool () const + { + return (_v != 0); + } + /** * Get this value as a double. * diff --git a/src/core/model/int64x64-cairo.h b/src/core/model/int64x64-cairo.h index ca2353578..3357b76dc 100644 --- a/src/core/model/int64x64-cairo.h +++ b/src/core/model/int64x64-cairo.h @@ -198,6 +198,12 @@ public: return *this; } + /** Explicit bool conversion. */ + inline explicit operator bool () const + { + return (_v != 0); + } + /** * Get this value as a double. * diff --git a/src/core/model/int64x64-double.h b/src/core/model/int64x64-double.h index 81e6cb591..5f653b2ea 100644 --- a/src/core/model/int64x64-double.h +++ b/src/core/model/int64x64-double.h @@ -112,7 +112,7 @@ public: : _v (v) {} inline int64x64_t (long long int v) - : _v (static_cast (v)) + : _v (static_cast (v)) {} inline int64x64_t (unsigned int v) : _v (v) @@ -121,7 +121,7 @@ public: : _v (v) {} inline int64x64_t (unsigned long long int v) - : _v (static_cast (v)) + : _v (static_cast (v)) {} /**@}*/ /** @@ -161,6 +161,12 @@ public: return *this; } + /** Explicit bool conversion. */ + inline explicit operator bool () const + { + return (_v != 0); + } + /** * Get this value as a double. *