Fix warning.

This commit is contained in:
levlam 2021-03-04 15:00:52 +03:00
parent d390c556fe
commit 1c3290bada
2 changed files with 5 additions and 5 deletions

View File

@ -11361,10 +11361,10 @@ const DialogParticipant *ContactsManager::get_chat_participant(ChatId chat_id, U
if (chat_full == nullptr) {
return nullptr;
}
return get_chat_participant(chat_full, user_id);
return get_chat_full_participant(chat_full, user_id);
}
const DialogParticipant *ContactsManager::get_chat_participant(const ChatFull *chat_full, UserId user_id) {
const DialogParticipant *ContactsManager::get_chat_full_participant(const ChatFull *chat_full, UserId user_id) {
for (const auto &dialog_participant : chat_full->participants) {
if (dialog_participant.user_id == user_id) {
return &dialog_participant;
@ -14594,8 +14594,8 @@ void ContactsManager::do_search_chat_participants(ChatId chat_id, const string &
int32 total_count;
std::tie(total_count, user_ids) = search_among_users(user_ids, query, limit);
promise.set_value(DialogParticipants{total_count, transform(user_ids, [this, chat_full](UserId user_id) {
return *get_chat_participant(chat_full, user_id);
promise.set_value(DialogParticipants{total_count, transform(user_ids, [chat_full](UserId user_id) {
return *ContactsManager::get_chat_full_participant(chat_full, user_id);
})});
}

View File

@ -1411,7 +1411,7 @@ class ContactsManager : public Actor {
const DialogParticipant *get_chat_participant(ChatId chat_id, UserId user_id) const;
static const DialogParticipant *get_chat_participant(const ChatFull *chat_full, UserId user_id);
static const DialogParticipant *get_chat_full_participant(const ChatFull *chat_full, UserId user_id);
std::pair<int32, vector<UserId>> search_among_users(const vector<UserId> &user_ids, const string &query,
int32 limit) const;