From 90d2203dab08eedc169978156c8c35d985217e29 Mon Sep 17 00:00:00 2001 From: levlam Date: Thu, 12 Mar 2020 18:36:47 +0300 Subject: [PATCH] Improve logging on check fail. GitOrigin-RevId: 91812e6f8c92ee58b503dd93126695b37f7c5950 --- td/telegram/MessageId.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/td/telegram/MessageId.h b/td/telegram/MessageId.h index 1d4392e7..355b1691 100644 --- a/td/telegram/MessageId.h +++ b/td/telegram/MessageId.h @@ -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