mirror of https://github.com/Icinga/icinga2.git
parent
e546cd854d
commit
98c3431dda
|
@ -198,6 +198,19 @@ ValueType Value::GetType(void) const
|
|||
return static_cast<ValueType>(m_Value.which());
|
||||
}
|
||||
|
||||
bool Value::operator==(bool rhs)
|
||||
{
|
||||
if (!IsScalar())
|
||||
return false;
|
||||
|
||||
return static_cast<double>(*this) == rhs;
|
||||
}
|
||||
|
||||
bool Value::operator!=(bool rhs)
|
||||
{
|
||||
return !(*this == rhs);
|
||||
}
|
||||
|
||||
bool Value::operator==(int rhs)
|
||||
{
|
||||
if (!IsScalar())
|
||||
|
|
|
@ -73,6 +73,9 @@ public:
|
|||
operator double(void) const;
|
||||
operator String(void) const;
|
||||
|
||||
bool operator==(bool rhs);
|
||||
bool operator!=(bool rhs);
|
||||
|
||||
bool operator==(int rhs);
|
||||
bool operator!=(int rhs);
|
||||
|
||||
|
|
Loading…
Reference in New Issue