Silence warning about wrong reply_to_message_id on message ID overflow.

GitOrigin-RevId: fd641f59568fab2dce3b02215f6d21d803950982
This commit is contained in:
levlam 2019-04-22 00:09:49 +03:00
parent e47f1d6947
commit f3acbcda34
2 changed files with 4 additions and 2 deletions

View File

@ -9842,7 +9842,9 @@ std::pair<DialogId, unique_ptr<MessagesManager::Message>> MessagesManager::creat
MessageId reply_to_message_id = message_info.reply_to_message_id; MessageId reply_to_message_id = message_info.reply_to_message_id;
if (reply_to_message_id != MessageId() && if (reply_to_message_id != MessageId() &&
(!reply_to_message_id.is_valid() || reply_to_message_id.get() >= message_id.get())) { (!reply_to_message_id.is_valid() || reply_to_message_id.get() >= message_id.get())) {
LOG(ERROR) << "Receive reply to wrong " << reply_to_message_id << " in " << message_id; if (!reply_to_message_id.is_valid() || reply_to_message_id.get() - message_id.get() <= 2000000000) {
LOG(ERROR) << "Receive reply to wrong " << reply_to_message_id << " in " << message_id;
}
reply_to_message_id = MessageId(); reply_to_message_id = MessageId();
} }

View File

@ -361,7 +361,7 @@ vector<int32> PollManager::get_vote_percentage(const vector<int32> &voter_counts
return result; return result;
} }
// now we need to choose up to (100 - percent_sum) options with minimum total gap, such so // now we need to choose up to (100 - percent_sum) options with minimum total gap, such that
// any two options with the same voter_count are chosen or not chosen simultaneously // any two options with the same voter_count are chosen or not chosen simultaneously
struct Option { struct Option {
int32 pos = -1; int32 pos = -1;