From 1c3290bada844f4469afbd342bdab7f31618f984 Mon Sep 17 00:00:00 2001 From: levlam Date: Thu, 4 Mar 2021 15:00:52 +0300 Subject: [PATCH] Fix warning. --- td/telegram/ContactsManager.cpp | 8 ++++---- td/telegram/ContactsManager.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/td/telegram/ContactsManager.cpp b/td/telegram/ContactsManager.cpp index 30705821a..566e03c51 100644 --- a/td/telegram/ContactsManager.cpp +++ b/td/telegram/ContactsManager.cpp @@ -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); })}); } diff --git a/td/telegram/ContactsManager.h b/td/telegram/ContactsManager.h index 8a34325e4..749eaba3e 100644 --- a/td/telegram/ContactsManager.h +++ b/td/telegram/ContactsManager.h @@ -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> search_among_users(const vector &user_ids, const string &query, int32 limit) const;