Variant
- Implemented ::trivial to faclitate operator shortcuts.
This commit is contained in:
@@ -1763,6 +1763,19 @@ int Variant::type ()
|
||||
return _type;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Variant::trivial () const
|
||||
{
|
||||
return (_type == type_unknown) ||
|
||||
(_type == type_integer && _integer == 0) ||
|
||||
(_type == type_real && _real == 0.0) ||
|
||||
(_type == type_string && _string == "") ||
|
||||
(_type == type_date && _date == 0) ||
|
||||
(_type == type_duration && _duration == 0);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Variant::get_bool () const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user