Fix some includes.

GitOrigin-RevId: f4b44d2e91ca72b6090d7f1f35673e8268723241
This commit is contained in:
levlam 2020-06-07 18:14:52 +03:00
parent 275150b67f
commit b1419f9de5
21 changed files with 42 additions and 10 deletions

View File

@ -6,8 +6,6 @@
//
#include "td/telegram/DialogDb.h"
#include "td/telegram/Global.h"
#include "td/telegram/TdDb.h"
#include "td/telegram/Version.h"
#include "td/actor/actor.h"
@ -18,8 +16,10 @@
#include "td/db/SqliteKeyValue.h"
#include "td/db/SqliteStatement.h"
#include "td/utils/common.h"
#include "td/utils/format.h"
#include "td/utils/logging.h"
#include "td/utils/misc.h"
#include "td/utils/ScopeGuard.h"
#include "td/utils/Time.h"
@ -80,7 +80,7 @@ Status init_dialog_db(SqliteDb &db, int32 version, KeyValueSyncInterface &binlog
TRY_STATUS(db.exec("UPDATE dialogs SET folder_id = 0 WHERE dialog_id < -1500000000000 AND dialog_order > 0"));
}
if (version < static_cast<int32>(DbVersion::StorePinnedDialogsInBinlog)) {
// 9221294780217032704 == get_dialog_order(MessageId(), MIN_PINNED_DIALOG_DATE - 1)
// 9221294780217032704 == get_dialog_order(Auto(), MIN_PINNED_DIALOG_DATE - 1)
TRY_RESULT(get_pinned_dialogs_stmt,
db.get_statement("SELECT dialog_id FROM dialogs WHERE folder_id == ?1 AND dialog_order > "
"9221294780217032704 ORDER BY dialog_order DESC, dialog_id DESC"));

View File

@ -6,9 +6,11 @@
//
#include "td/telegram/DialogFilter.h"
#include "td/telegram/DialogId.h"
#include "td/telegram/misc.h"
#include "td/utils/format.h"
#include "td/utils/logging.h"
#include "td/utils/misc.h"
#include <unordered_set>

View File

@ -13,6 +13,7 @@
#include "td/utils/common.h"
#include "td/utils/Status.h"
#include "td/utils/StringBuilder.h"
#include <unordered_map>

View File

@ -14,6 +14,7 @@
#include "td/utils/StringBuilder.h"
#include <functional>
#include <limits>
#include <type_traits>
namespace td {

View File

@ -6,8 +6,11 @@
//
#include "td/telegram/InputDialogId.h"
#include "td/telegram/ChannelId.h"
#include "td/telegram/ChatId.h"
#include "td/telegram/USerId.h"
#include "td/utils/logging.h"
#include "td/utils/misc.h"
namespace td {

View File

@ -25,6 +25,7 @@
#include "td/telegram/DeviceTokenManager.h"
#include "td/telegram/DialogAdministrator.h"
#include "td/telegram/DialogFilter.h"
#include "td/telegram/DialogFilterId.h"
#include "td/telegram/DialogId.h"
#include "td/telegram/DialogListId.h"
#include "td/telegram/DialogLocation.h"

View File

@ -29,10 +29,13 @@
#include "td/utils/common.h"
#include "td/utils/format.h"
#include "td/utils/logging.h"
#include "td/utils/misc.h"
#include "td/utils/port/path.h"
#include "td/utils/Random.h"
#include "td/utils/StringBuilder.h"
#include <algorithm>
namespace td {
namespace {
@ -525,7 +528,7 @@ Result<string> TdDb::get_stats() {
TRY_STATUS(run_kv_query("ss%"));
TRY_STATUS(run_kv_query("gr%"));
std::vector<int32> prev(1);
vector<int32> prev(1);
size_t count = 0;
int32 max_bad_to = 0;
size_t bad_count = 0;
@ -534,8 +537,8 @@ Result<string> TdDb::get_stats() {
return true;
}
count++;
auto from = to_integer<td::int32>(key.substr(4));
auto to = to_integer<td::int32>(value.substr(2));
auto from = to_integer<int32>(key.substr(4));
auto to = to_integer<int32>(value.substr(2));
if (from <= to) {
LOG(DEBUG) << "Have forward reference from " << from << " to " << to;
if (to > max_bad_to) {

View File

@ -6,6 +6,8 @@
//
#include "td/actor/MultiPromise.h"
#include "td/utils/logging.h"
namespace td {
void MultiPromiseActor::add_promise(Promise<Unit> &&promise) {

View File

@ -13,9 +13,7 @@
#include "td/utils/misc.h"
#include "td/utils/port/IPAddress.h"
#include "td/utils/port/wstring_convert.h"
#include "td/utils/StackAllocator.h"
#include "td/utils/Status.h"
#include "td/utils/StringBuilder.h"
#include "td/utils/Time.h"
#include <openssl/err.h>

View File

@ -15,6 +15,8 @@
#include "td/utils/port/thread_local.h"
#include "td/utils/Random.h"
#include "td/utils/ScopeGuard.h"
#include "td/utils/StackAllocator.h"
#include "td/utils/StringBuilder.h"
#if TD_HAVE_OPENSSL
#include <openssl/aes.h>
@ -38,6 +40,8 @@
#endif
#include <algorithm>
#include <cerrno>
#include <cstring>
#include <mutex>
#include <utility>

View File

@ -26,6 +26,8 @@
#include <utility>
#if TD_PORT_POSIX
#include <cerrno>
#include <fcntl.h>
#include <sys/file.h>
#include <sys/types.h>

View File

@ -14,6 +14,7 @@
#include "td/utils/port/PollFlags.h"
#if TD_PORT_POSIX
#include <cerrno>
#include <arpa/inet.h>
#include <fcntl.h>
@ -22,7 +23,6 @@
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
#endif
#if TD_PORT_WINDOWS

View File

@ -20,6 +20,8 @@
#endif
#if TD_PORT_POSIX
#include <cerrno>
#include <arpa/inet.h>
#include <fcntl.h>
#include <netinet/in.h>

View File

@ -20,6 +20,8 @@
#endif
#if TD_PORT_POSIX
#include <cerrno>
#include <arpa/inet.h>
#include <fcntl.h>
#include <netinet/in.h>

View File

@ -14,6 +14,8 @@ char disable_linker_warning_about_empty_file_epoll_cpp TD_UNUSED;
#include "td/utils/logging.h"
#include "td/utils/Status.h"
#include <cerrno>
#include <unistd.h>
namespace td {

View File

@ -16,6 +16,8 @@ char disable_linker_warning_about_empty_file_event_fd_bsd_cpp TD_UNUSED;
#include "td/utils/port/SocketFd.h"
#include "td/utils/Slice.h"
#include <cerrno>
#include <fcntl.h>
#include <poll.h>
#include <sys/socket.h>

View File

@ -17,6 +17,8 @@ char disable_linker_warning_about_empty_file_event_fd_linux_cpp TD_UNUSED;
#include "td/utils/ScopeGuard.h"
#include "td/utils/Slice.h"
#include <cerrno>
#include <poll.h>
#include <sys/eventfd.h>
#include <unistd.h>

View File

@ -13,6 +13,7 @@ char disable_linker_warning_about_empty_file_kqueue_cpp TD_UNUSED;
#include "td/utils/logging.h"
#include "td/utils/Status.h"
#include <cerrno>
#include <utility>
#include <sys/time.h>

View File

@ -16,6 +16,8 @@ char disable_linker_warning_about_empty_file_poll_cpp TD_UNUSED;
#include "td/utils/ScopeGuard.h"
#include "td/utils/Status.h"
#include <cerrno>
namespace td {
namespace detail {

View File

@ -16,6 +16,7 @@
#include "td/utils/SpinLock.h"
#include <atomic>
#include <cerrno>
#include <memory>
#include <type_traits>

View File

@ -43,6 +43,7 @@
#include <sys/syslimits.h>
#endif
#include <cerrno>
#include <cstdlib>
#include <string>