0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-10 05:58:56 +02:00

ircd:Ⓜ️:event: Relax comparator value checking.

This commit is contained in:
Jason Volk 2019-06-07 08:55:26 -07:00
parent def97cf25b
commit cfb5376fdb

View file

@ -3721,35 +3721,35 @@ bool
ircd::m::operator>=(const event &a, const event &b)
{
//assert(json::get<"room_id"_>(a) == json::get<"room_id"_>(b));
return at<"depth"_>(a) >= at<"depth"_>(b);
return json::get<"depth"_>(a) >= json::get<"depth"_>(b);
}
bool
ircd::m::operator<=(const event &a, const event &b)
{
//assert(json::get<"room_id"_>(a) == json::get<"room_id"_>(b));
return at<"depth"_>(a) <= at<"depth"_>(b);
return json::get<"depth"_>(a) <= json::get<"depth"_>(b);
}
bool
ircd::m::operator>(const event &a, const event &b)
{
//assert(json::get<"room_id"_>(a) == json::get<"room_id"_>(b));
return at<"depth"_>(a) > at<"depth"_>(b);
return json::get<"depth"_>(a) > json::get<"depth"_>(b);
}
bool
ircd::m::operator<(const event &a, const event &b)
{
//assert(json::get<"room_id"_>(a) == json::get<"room_id"_>(b));
return at<"depth"_>(a) < at<"depth"_>(b);
return json::get<"depth"_>(a) < json::get<"depth"_>(b);
}
bool
ircd::m::operator==(const event &a, const event &b)
{
//assert(json::get<"room_id"_>(a) == json::get<"room_id"_>(b));
return at<"event_id"_>(a) == at<"event_id"_>(b);
return json::get<"event_id"_>(a) == json::get<"event_id"_>(b);
}
bool