forked from Lephenixnoir/fxos
add extra symbol comparison methods
This commit is contained in:
parent
b494a30404
commit
efaad5b980
|
@ -37,7 +37,36 @@ struct Symbol
|
|||
|
||||
bool operator<(const FxOS::Symbol &right) const
|
||||
{
|
||||
return (type < right.type) || (value < right.value);
|
||||
return (type < right.type)
|
||||
|| (value < right.value && type == right.type);
|
||||
}
|
||||
|
||||
bool operator>(const FxOS::Symbol &right) const
|
||||
{
|
||||
return (type > right.type)
|
||||
|| (value > right.value && type == right.type);
|
||||
}
|
||||
|
||||
bool operator==(const FxOS::Symbol &right) const
|
||||
{
|
||||
return value == right.value && type == right.type;
|
||||
}
|
||||
|
||||
bool operator!=(const FxOS::Symbol &right) const
|
||||
{
|
||||
return value != right.value || type != right.type;
|
||||
}
|
||||
|
||||
bool operator>=(const FxOS::Symbol &right) const
|
||||
{
|
||||
return (type > right.type)
|
||||
|| (value >= right.value && type == right.type);
|
||||
}
|
||||
|
||||
bool operator<=(const FxOS::Symbol &right) const
|
||||
{
|
||||
return (type < right.type)
|
||||
|| (value <= right.value && type == right.type);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue