Unify include order.

GitOrigin-RevId: 981c4788511b9b286e954b2f85a7263b8baf8566
This commit is contained in:
levlam 2018-02-03 15:58:18 +03:00
parent cc091f0a2c
commit da4714b3ca
18 changed files with 58 additions and 55 deletions

View File

@ -4,6 +4,9 @@
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// //
#include "td/utils/benchmark.h"
#include "td/utils/logging.h"
#include <cstdio> #include <cstdio>
#include <fstream> #include <fstream>
#include <iostream> #include <iostream>
@ -14,9 +17,6 @@
#include <unistd.h> #include <unistd.h>
#include "td/utils/benchmark.h"
#include "td/utils/logging.h"
std::string create_tmp_file() { std::string create_tmp_file() {
#if TD_ANDROID #if TD_ANDROID
std::string name = "/data/local/tmp/large_file.txt"; std::string name = "/data/local/tmp/large_file.txt";

View File

@ -4,6 +4,12 @@
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// //
#include "td/utils/benchmark.h"
#include "td/utils/common.h"
#include "td/utils/logging.h"
#include "td/utils/MpscPollableQueue.h"
#include "td/utils/queue.h"
// TODO: check system calls // TODO: check system calls
// TODO: all return values must be checked // TODO: all return values must be checked
@ -18,12 +24,6 @@
#include <sys/syscall.h> #include <sys/syscall.h>
#include <unistd.h> #include <unistd.h>
#include "td/utils/benchmark.h"
#include "td/utils/common.h"
#include "td/utils/logging.h"
#include "td/utils/MpscPollableQueue.h"
#include "td/utils/queue.h"
#if TD_LINUX #if TD_LINUX
#include <sys/eventfd.h> #include <sys/eventfd.h>
#endif #endif

View File

@ -6,10 +6,10 @@
// //
#pragma once #pragma once
#include <string>
#include "td/tl/tl_config.h" #include "td/tl/tl_config.h"
#include <string>
namespace td { namespace td {
void gen_json_converter(const tl::tl_config &config, const std::string &file_name); void gen_json_converter(const tl::tl_config &config, const std::string &file_name);

View File

@ -6,13 +6,14 @@
// //
#include "td/telegram/net/PublicRsaKeyShared.h" #include "td/telegram/net/PublicRsaKeyShared.h"
#include <algorithm>
#include "td/utils/logging.h" #include "td/utils/logging.h"
#include "td/utils/Slice.h" #include "td/utils/Slice.h"
#include "td/utils/Status.h" #include "td/utils/Status.h"
#include <algorithm>
namespace td { namespace td {
PublicRsaKeyShared::PublicRsaKeyShared(DcId dc_id) : dc_id_(dc_id) { PublicRsaKeyShared::PublicRsaKeyShared(DcId dc_id) : dc_id_(dc_id) {
if (!dc_id_.is_empty()) { if (!dc_id_.is_empty()) {
return; return;
@ -140,4 +141,5 @@ void PublicRsaKeyShared::notify() {
auto it = remove_if(listeners_.begin(), listeners_.end(), [&](auto &listener) { return !listener->notify(); }); auto it = remove_if(listeners_.begin(), listeners_.end(), [&](auto &listener) { return !listener->notify(); });
listeners_.erase(it, listeners_.end()); listeners_.erase(it, listeners_.end());
} }
} // namespace td } // namespace td

View File

@ -17,6 +17,7 @@
#include <utility> #include <utility>
namespace td { namespace td {
class PublicRsaKeyShared : public PublicRsaKeyInterface { class PublicRsaKeyShared : public PublicRsaKeyInterface {
public: public:
explicit PublicRsaKeyShared(DcId dc_id); explicit PublicRsaKeyShared(DcId dc_id);

View File

@ -11,11 +11,11 @@
#include "td/telegram/net/NetQueryDispatcher.h" #include "td/telegram/net/NetQueryDispatcher.h"
#include "td/telegram/net/Session.h" #include "td/telegram/net/Session.h"
#include <functional>
#include "td/utils/logging.h" #include "td/utils/logging.h"
#include "td/utils/Slice.h" #include "td/utils/Slice.h"
#include <functional>
namespace td { namespace td {
namespace mtproto { namespace mtproto {
class RawConnection; class RawConnection;

View File

@ -6,15 +6,15 @@
// //
#pragma once #pragma once
#include "td/tl/TlObject.h"
#include "td/utils/int_types.h"
#include <cstdint> #include <cstdint>
#include <memory> #include <memory>
#include <string> #include <string>
#include <vector> #include <vector>
#include "td/tl/TlObject.h"
#include "td/utils/int_types.h"
namespace td { namespace td {
template <class Func, std::int32_t constructor_id> template <class Func, std::int32_t constructor_id>

View File

@ -6,15 +6,15 @@
// //
#pragma once #pragma once
#include "td/tl/TlObject.h"
#include "td/utils/misc.h"
#include <cstdint> #include <cstdint>
#include <memory> #include <memory>
#include <string> #include <string>
#include <vector> #include <vector>
#include "td/tl/TlObject.h"
#include "td/utils/misc.h"
namespace td { namespace td {
template <class Func, std::int32_t constructor_id> template <class Func, std::int32_t constructor_id>

View File

@ -10,12 +10,12 @@ char disable_linker_warning_about_empty_file_bignum_cpp TD_UNUSED;
#if TD_HAVE_OPENSSL #if TD_HAVE_OPENSSL
#include <openssl/bn.h>
#include <openssl/crypto.h>
#include "td/utils/logging.h" #include "td/utils/logging.h"
#include "td/utils/misc.h" #include "td/utils/misc.h"
#include <openssl/bn.h>
#include <openssl/crypto.h>
namespace td { namespace td {
class BigNumContext::Impl { class BigNumContext::Impl {

View File

@ -6,11 +6,11 @@
// //
#pragma once #pragma once
#include <atomic>
#include "td/utils/common.h" #include "td/utils/common.h"
#include "td/utils/logging.h" #include "td/utils/logging.h"
#include <atomic>
namespace td { namespace td {
//NB: holder of the queue holds all responsibility of freeing its nodes //NB: holder of the queue holds all responsibility of freeing its nodes
class MpscLinkQueueImpl { class MpscLinkQueueImpl {

View File

@ -6,10 +6,10 @@
// //
#pragma once #pragma once
#include <atomic>
#include "td/utils/port/thread.h" #include "td/utils/port/thread.h"
#include <atomic>
namespace td { namespace td {
class SpinLock { class SpinLock {

View File

@ -6,6 +6,10 @@
// //
#include "td/utils/Status.h" #include "td/utils/Status.h"
#if TD_PORT_WINDOWS
#include "td/utils/port/wstring_convert.h"
#endif
#if TD_PORT_POSIX #if TD_PORT_POSIX
#include "td/utils/port/thread_local.h" #include "td/utils/port/thread_local.h"
@ -14,10 +18,6 @@
#include <cstring> #include <cstring>
#endif #endif
#if TD_PORT_WINDOWS
#include "td/utils/port/wstring_convert.h"
#endif
namespace td { namespace td {
#if TD_PORT_POSIX #if TD_PORT_POSIX

View File

@ -6,16 +6,16 @@
// //
#pragma once #pragma once
#include "td/utils/common.h"
#include "td/utils/Slice-decl.h"
#include "td/utils/StackAllocator.h"
#include <cstdarg> #include <cstdarg>
#include <cstdio> #include <cstdio>
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>
#include <type_traits> #include <type_traits>
#include "td/utils/common.h"
#include "td/utils/Slice-decl.h"
#include "td/utils/StackAllocator.h"
namespace td { namespace td {
class StringBuilder { class StringBuilder {

View File

@ -6,12 +6,12 @@
// //
#pragma once #pragma once
#include <atomic>
#include <cmath>
#include "td/utils/common.h" #include "td/utils/common.h"
#include "td/utils/port/Clocks.h" #include "td/utils/port/Clocks.h"
#include <atomic>
#include <cmath>
namespace td { namespace td {
class Time { class Time {

View File

@ -6,6 +6,12 @@
// //
#include "td/utils/port/path.h" #include "td/utils/port/path.h"
#include "td/utils/port/Fd.h"
#if TD_WINDOWS
#include "td/utils/Random.h"
#endif
#if TD_PORT_POSIX #if TD_PORT_POSIX
#include <limits.h> #include <limits.h>
@ -26,12 +32,6 @@
#endif #endif
#include "td/utils/port/Fd.h"
#if TD_WINDOWS
#include "td/utils/Random.h"
#endif
#include <cstdlib> #include <cstdlib>
namespace td { namespace td {

View File

@ -8,6 +8,9 @@
#include "td/utils/port/config.h" #include "td/utils/port/config.h"
#include "td/utils/format.h"
#include "td/utils/logging.h"
#if TD_PORT_POSIX #if TD_PORT_POSIX
#include <signal.h> #include <signal.h>
#include <sys/mman.h> #include <sys/mman.h>
@ -23,9 +26,6 @@
#include <ctime> #include <ctime>
#include <limits> #include <limits>
#include "td/utils/format.h"
#include "td/utils/logging.h"
namespace td { namespace td {
#if TD_PORT_POSIX && !TD_DARWIN_TV_OS && !TD_DARWIN_WATCH_OS #if TD_PORT_POSIX && !TD_DARWIN_TV_OS && !TD_DARWIN_WATCH_OS

View File

@ -6,14 +6,14 @@
// //
#pragma once #pragma once
#include <cstring>
#include "td/utils/int_types.h" #include "td/utils/int_types.h"
#include "td/utils/logging.h" #include "td/utils/logging.h"
#include "td/utils/misc.h" #include "td/utils/misc.h"
#include "td/utils/Slice.h" #include "td/utils/Slice.h"
#include "td/utils/StorerBase.h" #include "td/utils/StorerBase.h"
#include <cstring>
namespace td { namespace td {
class TlStorerUnsafe { class TlStorerUnsafe {

View File

@ -19,6 +19,9 @@
#include "td/telegram/secret_api.h" #include "td/telegram/secret_api.h"
#include "td/telegram/telegram_api.h" #include "td/telegram/telegram_api.h"
#include "td/tl/tl_object_parse.h"
#include "td/tl/tl_object_store.h"
#include "td/utils/base64.h" #include "td/utils/base64.h"
#include "td/utils/buffer.h" #include "td/utils/buffer.h"
#include "td/utils/crypto.h" #include "td/utils/crypto.h"
@ -40,9 +43,6 @@
#include <map> #include <map>
#include <memory> #include <memory>
#include "td/tl/tl_object_parse.h"
#include "td/tl/tl_object_store.h"
REGISTER_TESTS(secret); REGISTER_TESTS(secret);
namespace my_api { namespace my_api {