From 3589676550057dacd51873e9572b88fe58959258 Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 22 Dec 2020 15:51:57 +0300 Subject: [PATCH] Minor fixes. --- CMakeLists.txt | 1 + td/generate/scheme/td_api.tl | 2 +- td/telegram/ContactsManager.cpp | 1 - td/telegram/GroupCallManager.cpp | 8 ++++++-- td/telegram/GroupCallManager.h | 2 ++ td/telegram/GroupCallParticipant.cpp | 2 ++ td/telegram/InputGroupCallId.cpp | 3 --- td/telegram/StickersManager.cpp | 2 ++ td/telegram/Td.cpp | 1 + tdactor/td/actor/ConcurrentScheduler.cpp | 1 + tdactor/td/actor/PromiseFuture.h | 1 + test/tdclient.cpp | 20 ++++++++++---------- test/tqueue.cpp | 10 ++++------ 13 files changed, 31 insertions(+), 23 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b03c28a4..bb81b3b88 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -494,6 +494,7 @@ set(TDLIB_SOURCE td/telegram/FullMessageId.h td/telegram/Game.h td/telegram/Global.h + td/telegram/GroupCallId.h td/telegram/GroupCallManager.h td/telegram/GroupCallParticipant.h td/telegram/HashtagHints.h diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index f48261039..be6b7afda 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -3225,7 +3225,7 @@ messageStatistics message_interaction_graph:StatisticalGraph = MessageStatistics point x:double y:double = Point; -//@class VectorPathCommand @description Reperesents a vector path command +//@class VectorPathCommand @description Represents a vector path command //@description A straight line to a given point @end_point The end point of the straight line vectorPathCommandLine end_point:point = VectorPathCommand; diff --git a/td/telegram/ContactsManager.cpp b/td/telegram/ContactsManager.cpp index 9aed8083e..e83f31856 100644 --- a/td/telegram/ContactsManager.cpp +++ b/td/telegram/ContactsManager.cpp @@ -19,7 +19,6 @@ #include "td/telegram/files/FileType.h" #include "td/telegram/FolderId.h" #include "td/telegram/Global.h" -#include "td/telegram/GroupCallManager.h" #include "td/telegram/InlineQueriesManager.h" #include "td/telegram/InputGroupCallId.h" #include "td/telegram/logevent/LogEvent.h" diff --git a/td/telegram/GroupCallManager.cpp b/td/telegram/GroupCallManager.cpp index 8d50a1751..379c0ea27 100644 --- a/td/telegram/GroupCallManager.cpp +++ b/td/telegram/GroupCallManager.cpp @@ -6,21 +6,25 @@ // #include "td/telegram/GroupCallManager.h" +#include "td/telegram/AccessRights.h" #include "td/telegram/AuthManager.h" #include "td/telegram/ContactsManager.h" #include "td/telegram/DialogParticipant.h" #include "td/telegram/Global.h" +#include "td/telegram/MessageId.h" #include "td/telegram/MessagesManager.h" #include "td/telegram/misc.h" #include "td/telegram/net/NetQuery.h" #include "td/telegram/Td.h" #include "td/telegram/UpdatesManager.h" -#include "td/actor/MultiPromise.h" - +#include "td/utils/buffer.h" #include "td/utils/JsonBuilder.h" +#include "td/utils/misc.h" #include "td/utils/Random.h" +#include +#include #include #include diff --git a/td/telegram/GroupCallManager.h b/td/telegram/GroupCallManager.h index 8fec9b725..fbd0dca24 100644 --- a/td/telegram/GroupCallManager.h +++ b/td/telegram/GroupCallManager.h @@ -18,6 +18,8 @@ #include "td/actor/PromiseFuture.h" #include "td/actor/Timeout.h" +#include "td/utils/common.h" +#include "td/utils/logging.h" #include "td/utils/Status.h" #include diff --git a/td/telegram/GroupCallParticipant.cpp b/td/telegram/GroupCallParticipant.cpp index 95a3cbb7a..4e0dbb70f 100644 --- a/td/telegram/GroupCallParticipant.cpp +++ b/td/telegram/GroupCallParticipant.cpp @@ -8,6 +8,8 @@ #include "td/telegram/ContactsManager.h" +#include "td/utils/logging.h" + namespace td { GroupCallParticipant::GroupCallParticipant(const tl_object_ptr &participant) { diff --git a/td/telegram/InputGroupCallId.cpp b/td/telegram/InputGroupCallId.cpp index 977585ad7..87e418321 100644 --- a/td/telegram/InputGroupCallId.cpp +++ b/td/telegram/InputGroupCallId.cpp @@ -6,9 +6,6 @@ // #include "td/telegram/InputGroupCallId.h" -#include "td/utils/logging.h" -#include "td/utils/misc.h" - namespace td { InputGroupCallId::InputGroupCallId(const tl_object_ptr &input_group_call) diff --git a/td/telegram/StickersManager.cpp b/td/telegram/StickersManager.cpp index b6f738996..148b90675 100644 --- a/td/telegram/StickersManager.cpp +++ b/td/telegram/StickersManager.cpp @@ -47,6 +47,8 @@ #include "td/utils/PathView.h" #include "td/utils/Random.h" #include "td/utils/Slice.h" +#include "td/utils/StackAllocator.h" +#include "td/utils/StringBuilder.h" #include "td/utils/Time.h" #include "td/utils/tl_helpers.h" #include "td/utils/utf8.h" diff --git a/td/telegram/Td.cpp b/td/telegram/Td.cpp index de6233e5d..5b31c42c1 100644 --- a/td/telegram/Td.cpp +++ b/td/telegram/Td.cpp @@ -43,6 +43,7 @@ #include "td/telegram/FolderId.h" #include "td/telegram/FullMessageId.h" #include "td/telegram/Global.h" +#include "td/telegram/GroupCallId.h" #include "td/telegram/GroupCallManager.h" #include "td/telegram/HashtagHints.h" #include "td/telegram/InlineQueriesManager.h" diff --git a/tdactor/td/actor/ConcurrentScheduler.cpp b/tdactor/td/actor/ConcurrentScheduler.cpp index 1b1e70093..4c41d92bd 100644 --- a/tdactor/td/actor/ConcurrentScheduler.cpp +++ b/tdactor/td/actor/ConcurrentScheduler.cpp @@ -9,6 +9,7 @@ #include "td/utils/ExitGuard.h" #include "td/utils/MpscPollableQueue.h" #include "td/utils/port/thread_local.h" +#include "td/utils/ScopeGuard.h" #include diff --git a/tdactor/td/actor/PromiseFuture.h b/tdactor/td/actor/PromiseFuture.h index e6ffbc8f5..8afcadf6e 100644 --- a/tdactor/td/actor/PromiseFuture.h +++ b/tdactor/td/actor/PromiseFuture.h @@ -12,6 +12,7 @@ #include "td/utils/Closure.h" #include "td/utils/common.h" #include "td/utils/invoke.h" // for tuple_for_each +#include "td/utils/MovableValue.h" #include "td/utils/ScopeGuard.h" #include "td/utils/Status.h" diff --git a/test/tdclient.cpp b/test/tdclient.cpp index 46f731d4e..0ad3cebda 100644 --- a/test/tdclient.cpp +++ b/test/tdclient.cpp @@ -162,7 +162,7 @@ class TestClient : public td::Actor { td::Promise<> close_promise_; }; -class Task : public TestClient::Listener { +class TestClinetTask : public TestClient::Listener { public: void on_update(std::shared_ptr update) override { auto it = sent_queries_.find(update->id); @@ -198,7 +198,7 @@ class Task : public TestClient::Listener { } }; -class DoAuthentication : public Task { +class DoAuthentication : public TestClinetTask { public: DoAuthentication(td::string name, td::string phone, td::string code, td::Promise<> promise) : name_(std::move(name)), phone_(std::move(phone)), code_(std::move(code)), promise_(std::move(promise)) { @@ -274,7 +274,7 @@ class DoAuthentication : public Task { } }; -class SetUsername : public Task { +class SetUsername : public TestClinetTask { public: SetUsername(td::string username, td::Promise<> promise) : username_(std::move(username)), promise_(std::move(promise)) { @@ -339,7 +339,7 @@ class SetUsername : public Task { } }; -class CheckTestA : public Task { +class CheckTestA : public TestClinetTask { public: CheckTestA(td::string tag, td::Promise<> promise) : tag_(std::move(tag)), promise_(std::move(promise)) { } @@ -371,7 +371,7 @@ class CheckTestA : public Task { } }; -class TestA : public Task { +class TestA : public TestClinetTask { public: TestA(td::string tag, td::string username) : tag_(std::move(tag)), username_(std::move(username)) { } @@ -397,7 +397,7 @@ class TestA : public Task { td::string username_; }; -class TestSecretChat : public Task { +class TestSecretChat : public TestClinetTask { public: TestSecretChat(td::string tag, td::string username) : tag_(std::move(tag)), username_(std::move(username)) { } @@ -448,7 +448,7 @@ class TestSecretChat : public Task { td::int64 chat_id_ = 0; }; -class TestFileGenerated : public Task { +class TestFileGenerated : public TestClinetTask { public: TestFileGenerated(td::string tag, td::string username) : tag_(std::move(tag)), username_(std::move(username)) { } @@ -514,7 +514,7 @@ class TestFileGenerated : public Task { class GenerateFile : public td::Actor { public: - GenerateFile(Task *parent, td::int64 id, td::string original_path, td::string destination_path, + GenerateFile(TestClinetTask *parent, td::int64 id, td::string original_path, td::string destination_path, td::string conversion) : parent_(parent) , id_(id) @@ -524,7 +524,7 @@ class TestFileGenerated : public Task { } private: - Task *parent_; + TestClinetTask *parent_; td::int64 id_; td::string original_path_; td::string destination_path_; @@ -589,7 +589,7 @@ class TestFileGenerated : public Task { td::int64 chat_id_ = 0; }; -class CheckTestC : public Task { +class CheckTestC : public TestClinetTask { public: CheckTestC(td::string username, td::string tag, td::Promise<> promise) : username_(std::move(username)), tag_(std::move(tag)), promise_(std::move(promise)) { diff --git a/test/tqueue.cpp b/test/tqueue.cpp index 828491a2e..5d6eff2ac 100644 --- a/test/tqueue.cpp +++ b/test/tqueue.cpp @@ -10,18 +10,16 @@ #include "td/db/TQueue.h" #include "td/utils/buffer.h" +#include "td/utils/common.h" #include "td/utils/int_types.h" -#include "td/utils/misc.h" -#include "td/utils/port/path.h" +#include "td/utils/logging.h" #include "td/utils/Random.h" #include "td/utils/Slice.h" #include "td/utils/Span.h" -#include "td/utils/Status.h" #include "td/utils/tests.h" -#include "td/utils/VectorQueue.h" -#include -#include +#include +#include TEST(TQueue, hands) { td::TQueue::Event events[100];