From b3bae546ec40a6ee014faf50e275b7d21f24ef79 Mon Sep 17 00:00:00 2001 From: levlam Date: Thu, 27 Sep 2018 16:37:15 +0300 Subject: [PATCH] Various fixes. GitOrigin-RevId: 52699dbd5280b63c6bb32da44ea5bfa3157a7922 --- benchmark/wget.cpp | 1 - example/cpp/td_example.cpp | 1 - td/generate/tl_writer_h.cpp | 1 - td/generate/tl_writer_jni_h.cpp | 1 - td/telegram/MessagesManager.cpp | 2 +- td/telegram/PasswordManager.cpp | 1 + td/telegram/SecureManager.cpp | 2 ++ td/telegram/SecureManager.h | 1 - td/telegram/cli.cpp | 1 - td/telegram/files/FileGenerateManager.cpp | 1 + td/telegram/files/FileManager.h | 1 + td/telegram/net/ConnectionCreator.h | 1 + td/telegram/td_c_client.cpp | 1 - td/tl/tl_object_parse.h | 1 - td/tl/tl_object_store.h | 1 - tdactor/example/example.cpp | 1 + tdactor/td/actor/impl/ConcurrentScheduler.h | 1 + tdactor/td/actor/impl/Scheduler.h | 1 + tdactor/test/actors_simple.cpp | 1 + tdutils/td/utils/DecTree.h | 1 - tdutils/td/utils/misc.h | 1 - tdutils/td/utils/port/detail/EventFdLinux.cpp | 1 + tdutils/test/misc.cpp | 1 + 23 files changed, 13 insertions(+), 12 deletions(-) diff --git a/benchmark/wget.cpp b/benchmark/wget.cpp index 0103d7f11..e8a02e3a5 100644 --- a/benchmark/wget.cpp +++ b/benchmark/wget.cpp @@ -14,7 +14,6 @@ #include "td/utils/logging.h" #include "td/utils/Status.h" -#include #include int main(int argc, char *argv[]) { diff --git a/example/cpp/td_example.cpp b/example/cpp/td_example.cpp index 14a5f3c48..d29ff62af 100644 --- a/example/cpp/td_example.cpp +++ b/example/cpp/td_example.cpp @@ -94,7 +94,6 @@ class TdExample { } else if (action == "me") { send_query(td_api::make_object(), [this](Object object) { std::cerr << to_string(object) << std::endl; }); - } else if (action == "l") { std::cerr << "Logging out..." << std::endl; send_query(td_api::make_object(), {}); diff --git a/td/generate/tl_writer_h.cpp b/td/generate/tl_writer_h.cpp index 879035e00..ee116b8fe 100644 --- a/td/generate/tl_writer_h.cpp +++ b/td/generate/tl_writer_h.cpp @@ -50,7 +50,6 @@ std::string TD_TL_writer_h::gen_output_begin() const { "#include \"td/tl/TlObject.h\"\n\n" + ext_include_str + "#include \n" - "#include \n" "#include \n" "#include \n\n" "namespace td {\n" + diff --git a/td/generate/tl_writer_jni_h.cpp b/td/generate/tl_writer_jni_h.cpp index d974d454d..a35643be3 100644 --- a/td/generate/tl_writer_jni_h.cpp +++ b/td/generate/tl_writer_jni_h.cpp @@ -66,7 +66,6 @@ std::string TD_TL_writer_jni_h::gen_output_begin() const { return "#pragma once\n\n" "#include \"td/tl/TlObject.h\"\n\n" "#include \n" - "#include \n" "#include \n" "#include \n\n" "#include \n\n" + diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 44dee8eae..fac5d7a98 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -26328,7 +26328,7 @@ MessagesManager::Message *MessagesManager::continue_send_message(DialogId dialog auto can_send_status = can_send_message(dialog_id); if (can_send_status.is_ok() && result_message->send_date < now - MAX_RESEND_DELAY) { - can_send_status = Status::Error(400, "Message is too old to be resent automatically"); + can_send_status = Status::Error(400, "Message is too old to be re-sent automatically"); } if (can_send_status.is_error()) { LOG(INFO) << "Can't resend a message to " << dialog_id << ": " << can_send_status.error(); diff --git a/td/telegram/PasswordManager.cpp b/td/telegram/PasswordManager.cpp index 637958c9c..bfb520211 100644 --- a/td/telegram/PasswordManager.cpp +++ b/td/telegram/PasswordManager.cpp @@ -21,6 +21,7 @@ #include "td/utils/logging.h" #include "td/utils/Random.h" #include "td/utils/Slice.h" +#include "td/utils/Time.h" #include "td/telegram/td_api.h" #include "td/telegram/telegram_api.h" // TODO: this file is already included. Why? diff --git a/td/telegram/SecureManager.cpp b/td/telegram/SecureManager.cpp index 3206a4c91..641c099dd 100644 --- a/td/telegram/SecureManager.cpp +++ b/td/telegram/SecureManager.cpp @@ -22,6 +22,8 @@ #include "td/utils/optional.h" #include "td/utils/Slice.h" +#include + namespace td { class GetSecureValue : public NetQueryCallback { diff --git a/td/telegram/SecureManager.h b/td/telegram/SecureManager.h index 4e4b36966..06f2ad398 100644 --- a/td/telegram/SecureManager.h +++ b/td/telegram/SecureManager.h @@ -20,7 +20,6 @@ #include "td/utils/Status.h" #include -#include #include #include diff --git a/td/telegram/cli.cpp b/td/telegram/cli.cpp index d07fb13cf..05061eb94 100644 --- a/td/telegram/cli.cpp +++ b/td/telegram/cli.cpp @@ -51,7 +51,6 @@ #include #include #include -#include #include #include #include diff --git a/td/telegram/files/FileGenerateManager.cpp b/td/telegram/files/FileGenerateManager.cpp index e9608ab6b..6240c435f 100644 --- a/td/telegram/files/FileGenerateManager.cpp +++ b/td/telegram/files/FileGenerateManager.cpp @@ -24,6 +24,7 @@ #include "td/utils/Slice.h" #include +#include #include namespace td { diff --git a/td/telegram/files/FileManager.h b/td/telegram/files/FileManager.h index 8bdf94ae2..54083f797 100644 --- a/td/telegram/files/FileManager.h +++ b/td/telegram/files/FileManager.h @@ -25,6 +25,7 @@ #include "td/utils/common.h" #include "td/utils/Container.h" #include "td/utils/Enumerator.h" +#include "td/utils/logging.h" #include "td/utils/Slice.h" #include "td/utils/Status.h" diff --git a/td/telegram/net/ConnectionCreator.h b/td/telegram/net/ConnectionCreator.h index 502e2ab22..0efcda4c2 100644 --- a/td/telegram/net/ConnectionCreator.h +++ b/td/telegram/net/ConnectionCreator.h @@ -24,6 +24,7 @@ #include "td/net/NetStats.h" #include "td/utils/FloodControlStrict.h" +#include "td/utils/logging.h" #include "td/utils/port/IPAddress.h" #include "td/utils/port/SocketFd.h" #include "td/utils/Slice.h" diff --git a/td/telegram/td_c_client.cpp b/td/telegram/td_c_client.cpp index 92700cddd..b72353d03 100644 --- a/td/telegram/td_c_client.cpp +++ b/td/telegram/td_c_client.cpp @@ -9,7 +9,6 @@ #include "td/telegram/Client.h" #include "td/telegram/Log.h" -#include "td/telegram/td_api.h" #include "td/telegram/td_tdc_api_inner.h" #include diff --git a/td/tl/tl_object_parse.h b/td/tl/tl_object_parse.h index 953e0940b..0bcb7d34e 100644 --- a/td/tl/tl_object_parse.h +++ b/td/tl/tl_object_parse.h @@ -11,7 +11,6 @@ #include "td/utils/int_types.h" #include -#include #include #include diff --git a/td/tl/tl_object_store.h b/td/tl/tl_object_store.h index f6cd37669..3df1fd3c5 100644 --- a/td/tl/tl_object_store.h +++ b/td/tl/tl_object_store.h @@ -11,7 +11,6 @@ #include "td/utils/misc.h" #include -#include #include #include diff --git a/tdactor/example/example.cpp b/tdactor/example/example.cpp index 4e3fedf80..f01cc76e9 100644 --- a/tdactor/example/example.cpp +++ b/tdactor/example/example.cpp @@ -7,6 +7,7 @@ #include "td/actor/actor.h" #include "td/utils/logging.h" +#include "td/utils/Time.h" class Worker : public td::Actor { public: diff --git a/tdactor/td/actor/impl/ConcurrentScheduler.h b/tdactor/td/actor/impl/ConcurrentScheduler.h index bed18a059..8dde55b74 100644 --- a/tdactor/td/actor/impl/ConcurrentScheduler.h +++ b/tdactor/td/actor/impl/ConcurrentScheduler.h @@ -12,6 +12,7 @@ #include "td/utils/logging.h" #include "td/utils/port/thread.h" #include "td/utils/Slice.h" +#include "td/utils/Time.h" #if TD_PORT_WINDOWS #include "td/utils/port/detail/Iocp.h" diff --git a/tdactor/td/actor/impl/Scheduler.h b/tdactor/td/actor/impl/Scheduler.h index 0b546d8eb..9e6bfed58 100644 --- a/tdactor/td/actor/impl/Scheduler.h +++ b/tdactor/td/actor/impl/Scheduler.h @@ -17,6 +17,7 @@ #include "td/utils/port/detail/PollableFd.h" #include "td/utils/port/PollFlags.h" #include "td/utils/Slice.h" +#include "td/utils/Time.h" #include #include diff --git a/tdactor/test/actors_simple.cpp b/tdactor/test/actors_simple.cpp index bded32f81..2a5b71a71 100644 --- a/tdactor/test/actors_simple.cpp +++ b/tdactor/test/actors_simple.cpp @@ -20,6 +20,7 @@ #include "td/utils/Slice.h" #include "td/utils/Status.h" #include "td/utils/StringBuilder.h" +#include "td/utils/Time.h" #include #include diff --git a/tdutils/td/utils/DecTree.h b/tdutils/td/utils/DecTree.h index eade6a4a6..76785178b 100644 --- a/tdutils/td/utils/DecTree.h +++ b/tdutils/td/utils/DecTree.h @@ -12,7 +12,6 @@ #include "td/utils/Random.h" #include -#include #include namespace td { diff --git a/tdutils/td/utils/misc.h b/tdutils/td/utils/misc.h index 22f049ab4..417e7de1b 100644 --- a/tdutils/td/utils/misc.h +++ b/tdutils/td/utils/misc.h @@ -14,7 +14,6 @@ #include #include -#include #include #include diff --git a/tdutils/td/utils/port/detail/EventFdLinux.cpp b/tdutils/td/utils/port/detail/EventFdLinux.cpp index 99a73fc5b..e4eade42d 100644 --- a/tdutils/td/utils/port/detail/EventFdLinux.cpp +++ b/tdutils/td/utils/port/detail/EventFdLinux.cpp @@ -14,6 +14,7 @@ char disable_linker_warning_about_empty_file_event_fd_linux_cpp TD_UNUSED; #include "td/utils/misc.h" #include "td/utils/port/detail/NativeFd.h" #include "td/utils/port/PollFlags.h" +#include "td/utils/ScopeGuard.h" #include "td/utils/Slice.h" #include diff --git a/tdutils/test/misc.cpp b/tdutils/test/misc.cpp index c3c2f535a..821888543 100644 --- a/tdutils/test/misc.cpp +++ b/tdutils/test/misc.cpp @@ -30,6 +30,7 @@ #include #include #include +#include using namespace td;