mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 23:44:01 +01:00
ircd:Ⓜ️ Add room object equality operator suite.
This commit is contained in:
parent
48da29cf2f
commit
6ae6624772
2 changed files with 21 additions and 0 deletions
|
@ -29,6 +29,9 @@ namespace ircd::m
|
|||
|
||||
// Util
|
||||
bool my(const room &);
|
||||
bool operator!(const room &); // room_id empty
|
||||
bool operator!=(const room &, const room &); // room_id inequality
|
||||
bool operator==(const room &, const room &); // room_id equality
|
||||
|
||||
// [GET] Util
|
||||
bool exists(const room &);
|
||||
|
|
|
@ -262,6 +262,24 @@ ircd::m::exists(const room &room)
|
|||
return exists(room.room_id);
|
||||
}
|
||||
|
||||
bool
|
||||
ircd::m::operator==(const room &a, const room &b)
|
||||
{
|
||||
return !(a != b);
|
||||
}
|
||||
|
||||
bool
|
||||
ircd::m::operator!=(const room &a, const room &b)
|
||||
{
|
||||
return a.room_id != b.room_id;
|
||||
}
|
||||
|
||||
bool
|
||||
ircd::m::operator!(const room &a)
|
||||
{
|
||||
return !a.room_id;
|
||||
}
|
||||
|
||||
bool
|
||||
ircd::m::my(const room &room)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue