Explicit operator bool() for int64x64_t
This commit is contained in:
committed by
Tom Henderson
parent
7617186e8f
commit
e2ee75cd5a
@@ -217,6 +217,12 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
/** Explicit bool conversion. */
|
||||
inline explicit operator bool () const
|
||||
{
|
||||
return (_v != 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get this value as a double.
|
||||
*
|
||||
|
||||
@@ -198,6 +198,12 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
/** Explicit bool conversion. */
|
||||
inline explicit operator bool () const
|
||||
{
|
||||
return (_v != 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get this value as a double.
|
||||
*
|
||||
|
||||
@@ -112,7 +112,7 @@ public:
|
||||
: _v (v)
|
||||
{}
|
||||
inline int64x64_t (long long int v)
|
||||
: _v (static_cast<double> (v))
|
||||
: _v (static_cast<long double> (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<double> (v))
|
||||
: _v (static_cast<long double> (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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user