Fix warnings.

This commit is contained in:
levlam 2023-07-06 20:55:02 +03:00
parent 5130ec7760
commit 0f8de6c91d
3 changed files with 9 additions and 3 deletions

View File

@ -22766,8 +22766,8 @@ void MessagesManager::on_get_affected_history(DialogId dialog_id, AffectedHistor
}
std::function<int32(MessageId)> MessagesManager::get_get_message_date(const Dialog *d) const {
return [this, d](MessageId message_id) {
auto *m = get_message(d, message_id);
return [d](MessageId message_id) {
const auto *m = get_message_static(d, message_id);
CHECK(m != nullptr);
return m->date;
};
@ -34214,6 +34214,10 @@ const MessagesManager::Message *MessagesManager::get_message(const Dialog *d, Me
return result;
}
const MessagesManager::Message *MessagesManager::get_message_static(const Dialog *d, MessageId message_id) {
return get_message(d, message_id);
}
MessagesManager::Message *MessagesManager::get_message_force(Dialog *d, MessageId message_id, const char *source) {
if (!message_id.is_valid() && !message_id.is_valid_scheduled()) {
return nullptr;

View File

@ -2765,6 +2765,7 @@ class MessagesManager final : public Actor {
static Message *get_message(Dialog *d, MessageId message_id);
static const Message *get_message(const Dialog *d, MessageId message_id);
static const Message *get_message_static(const Dialog *d, MessageId message_id);
Message *get_message(FullMessageId full_message_id);
const Message *get_message(FullMessageId full_message_id) const;

View File

@ -52,7 +52,8 @@ void StoryInteractionInfo::set_recent_viewer_user_ids(vector<UserId> &&user_ids)
}
bool StoryInteractionInfo::definitely_has_no_user(UserId user_id) const {
return !is_empty() && view_count_ <= MAX_RECENT_VIEWERS && !contains(recent_viewer_user_ids_, user_id);
return !is_empty() && view_count_ <= static_cast<int32>(MAX_RECENT_VIEWERS) &&
!contains(recent_viewer_user_ids_, user_id);
}
td_api::object_ptr<td_api::storyInteractionInfo> StoryInteractionInfo::get_story_interaction_info_object(Td *td) const {