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
// 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 <fstream>
#include <iostream>
@ -14,9 +17,6 @@
#include <unistd.h>
#include "td/utils/benchmark.h"
#include "td/utils/logging.h"
std::string create_tmp_file() {
#if TD_ANDROID
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
// 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: all return values must be checked
@ -18,12 +24,6 @@
#include <sys/syscall.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
#include <sys/eventfd.h>
#endif

View File

@ -6,10 +6,10 @@
//
#pragma once
#include <string>
#include "td/tl/tl_config.h"
#include <string>
namespace td {
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 <algorithm>
#include "td/utils/logging.h"
#include "td/utils/Slice.h"
#include "td/utils/Status.h"
#include <algorithm>
namespace td {
PublicRsaKeyShared::PublicRsaKeyShared(DcId dc_id) : dc_id_(dc_id) {
if (!dc_id_.is_empty()) {
return;
@ -140,4 +141,5 @@ void PublicRsaKeyShared::notify() {
auto it = remove_if(listeners_.begin(), listeners_.end(), [&](auto &listener) { return !listener->notify(); });
listeners_.erase(it, listeners_.end());
}
} // namespace td

View File

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

View File

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

View File

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

View File

@ -6,15 +6,15 @@
//
#pragma once
#include "td/tl/TlObject.h"
#include "td/utils/misc.h"
#include <cstdint>
#include <memory>
#include <string>
#include <vector>
#include "td/tl/TlObject.h"
#include "td/utils/misc.h"
namespace td {
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
#include <openssl/bn.h>
#include <openssl/crypto.h>
#include "td/utils/logging.h"
#include "td/utils/misc.h"
#include <openssl/bn.h>
#include <openssl/crypto.h>
namespace td {
class BigNumContext::Impl {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -19,6 +19,9 @@
#include "td/telegram/secret_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/buffer.h"
#include "td/utils/crypto.h"
@ -40,9 +43,6 @@
#include <map>
#include <memory>
#include "td/tl/tl_object_parse.h"
#include "td/tl/tl_object_store.h"
REGISTER_TESTS(secret);
namespace my_api {