From 47629838032a2e34e20bcbda21f94197c170f126 Mon Sep 17 00:00:00 2001 From: levlam Date: Fri, 12 Nov 2021 14:39:04 +0300 Subject: [PATCH] Inline Td::send. --- td/telegram/Td.cpp | 9 ++------- td/telegram/Td.h | 2 -- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/td/telegram/Td.cpp b/td/telegram/Td.cpp index eb67ef91d..101cb4d38 100644 --- a/td/telegram/Td.cpp +++ b/td/telegram/Td.cpp @@ -161,7 +161,8 @@ void Td::ResultHandler::set_td(Td *td) { void Td::ResultHandler::send_query(NetQueryPtr query) { td_->add_handler(query->id(), shared_from_this()); - send(std::move(query)); + query->debug("Send to NetQueryDispatcher"); + G()->net_query_dispatcher().dispatch(std::move(query)); } class GetPromoDataQuery final : public Td::ResultHandler { @@ -3208,12 +3209,6 @@ std::shared_ptr Td::extract_handler(uint64 id) { return result; } -void Td::send(NetQueryPtr &&query) { - VLOG(net_query) << "Send " << query << " to dispatcher"; - query->debug("Td: send to NetQueryDispatcher"); - G()->net_query_dispatcher().dispatch(std::move(query)); -} - void Td::on_update(BufferSlice &&update) { if (close_flag_ > 1) { return; diff --git a/td/telegram/Td.h b/td/telegram/Td.h index 94bd0cebe..8afb12d5e 100644 --- a/td/telegram/Td.h +++ b/td/telegram/Td.h @@ -351,8 +351,6 @@ class Td final : public Actor { void on_config_option_updated(const string &name); - static void send(NetQueryPtr &&query); - class OnRequest; class DownloadFileCallback;