Improve logging on check fail.

GitOrigin-RevId: 91812e6f8c92ee58b503dd93126695b37f7c5950
This commit is contained in:
levlam 2020-03-12 18:36:47 +03:00
parent dca3862088
commit 90d2203dab
1 changed files with 6 additions and 3 deletions

View File

@ -150,15 +150,18 @@ class MessageId {
}
friend bool operator>(const MessageId &lhs, const MessageId &rhs) {
return rhs < lhs;
CHECK(lhs.is_scheduled() == rhs.is_scheduled());
return lhs.id > rhs.id;
}
friend bool operator<=(const MessageId &lhs, const MessageId &rhs) {
return !(rhs < lhs);
CHECK(lhs.is_scheduled() == rhs.is_scheduled());
return lhs.id <= rhs.id;
}
friend bool operator>=(const MessageId &lhs, const MessageId &rhs) {
return !(lhs < rhs);
CHECK(lhs.is_scheduled() == rhs.is_scheduled());
return lhs.id >= rhs.id;
}
template <class StorerT>