From dd398c596839f5b0a17d60a664332f74959074a9 Mon Sep 17 00:00:00 2001 From: levlam Date: Wed, 13 Feb 2019 00:28:47 +0300 Subject: [PATCH] Fix formatting. GitOrigin-RevId: 144f91ea1ad0a1f9a8e5e08c4c10f238b066be47 --- td/telegram/AnimationsManager.cpp | 2 +- td/telegram/ContactsManager.cpp | 9 +++++---- td/telegram/net/NetQueryCreator.cpp | 2 +- tdactor/td/actor/impl/Scheduler.h | 3 ++- tddb/td/db/binlog/detail/BinlogEventsProcessor.h | 2 +- tdutils/td/utils/Variant.h | 2 +- tdutils/td/utils/tl_parsers.cpp | 2 +- 7 files changed, 12 insertions(+), 10 deletions(-) diff --git a/td/telegram/AnimationsManager.cpp b/td/telegram/AnimationsManager.cpp index b3170b40..dad82884 100644 --- a/td/telegram/AnimationsManager.cpp +++ b/td/telegram/AnimationsManager.cpp @@ -152,7 +152,7 @@ tl_object_ptr AnimationsManager::get_animation_object(FileId auto &animation = animations_[file_id]; LOG_CHECK(animation != nullptr) << source << " " << file_id << " " - << static_cast(td_->file_manager_->get_file_view(file_id).get_type()); + << static_cast(td_->file_manager_->get_file_view(file_id).get_type()); // TODO can we make that function const? animation->is_changed = false; return make_tl_object(animation->duration, animation->dimensions.width, diff --git a/td/telegram/ContactsManager.cpp b/td/telegram/ContactsManager.cpp index c3baeeb7..3921f882 100644 --- a/td/telegram/ContactsManager.cpp +++ b/td/telegram/ContactsManager.cpp @@ -5258,10 +5258,11 @@ void ContactsManager::on_save_user_to_database(UserId user_id, bool success) { User *u = get_user(user_id); CHECK(u != nullptr); LOG_CHECK(u->is_being_saved) << user_id << " " << u->is_saved << " " << u->is_status_saved << " " - << load_user_from_database_queries_.count(user_id) << " " << u->is_received << " " - << u->is_deleted << " " << u->is_bot << " " << u->is_changed << " " << u->need_send_update - << " " << u->is_status_changed << " " << u->is_name_changed << " " << u->is_username_changed - << " " << u->is_photo_changed << " " << u->is_outbound_link_changed; + << load_user_from_database_queries_.count(user_id) << " " << u->is_received << " " + << u->is_deleted << " " << u->is_bot << " " << u->is_changed << " " + << u->need_send_update << " " << u->is_status_changed << " " << u->is_name_changed << " " + << u->is_username_changed << " " << u->is_photo_changed << " " + << u->is_outbound_link_changed; CHECK(load_user_from_database_queries_.count(user_id) == 0); u->is_being_saved = false; diff --git a/td/telegram/net/NetQueryCreator.cpp b/td/telegram/net/NetQueryCreator.cpp index a17a5ae6..950cd236 100644 --- a/td/telegram/net/NetQueryCreator.cpp +++ b/td/telegram/net/NetQueryCreator.cpp @@ -19,7 +19,7 @@ NetQueryCreator::Ptr NetQueryCreator::create(uint64 id, const Storer &storer, Dc BufferSlice slice(storer.size()); auto real_size = storer.store(slice.as_slice().ubegin()); LOG_CHECK(real_size == slice.size()) << real_size << " " << slice.size() << " " - << format::as_hex_dump<4>(Slice(slice.as_slice())); + << format::as_hex_dump<4>(Slice(slice.as_slice())); // TODO: magic constant if (slice.size() < (1 << 8)) { diff --git a/tdactor/td/actor/impl/Scheduler.h b/tdactor/td/actor/impl/Scheduler.h index 978018fa..62271a32 100644 --- a/tdactor/td/actor/impl/Scheduler.h +++ b/tdactor/td/actor/impl/Scheduler.h @@ -105,7 +105,8 @@ ActorOwn Scheduler::register_actor_impl(Slice name, ActorT *actor_ptr, A #if TD_THREAD_UNSUPPORTED || TD_EVENTFD_UNSUPPORTED sched_id = 0; #endif - LOG_CHECK(sched_id == sched_id_ || (0 <= sched_id && sched_id < static_cast(outbound_queues_.size()))) << sched_id; + LOG_CHECK(sched_id == sched_id_ || (0 <= sched_id && sched_id < static_cast(outbound_queues_.size()))) + << sched_id; auto info = actor_info_pool_->create_empty(); VLOG(actor) << "Create actor: " << tag("name", name) << tag("ptr", *info) << tag("context", context()) << tag("this", this) << tag("actor_count", actor_count_); diff --git a/tddb/td/db/binlog/detail/BinlogEventsProcessor.h b/tddb/td/db/binlog/detail/BinlogEventsProcessor.h index 0b74e974..0d3417d3 100644 --- a/tddb/td/db/binlog/detail/BinlogEventsProcessor.h +++ b/tddb/td/db/binlog/detail/BinlogEventsProcessor.h @@ -24,7 +24,7 @@ class BinlogEventsProcessor { void for_each(CallbackT &&callback) { for (size_t i = 0; i < ids_.size(); i++) { LOG_CHECK(i == 0 || ids_[i - 1] < ids_[i]) << ids_[i - 1] << " " << events_[i - 1].public_to_string() << " " - << ids_[i] << " " << events_[i].public_to_string(); + << ids_[i] << " " << events_[i].public_to_string(); if ((ids_[i] & 1) == 0) { callback(events_[i]); } diff --git a/tdutils/td/utils/Variant.h b/tdutils/td/utils/Variant.h index 5a6efa7a..ec0301a0 100644 --- a/tdutils/td/utils/Variant.h +++ b/tdutils/td/utils/Variant.h @@ -172,7 +172,7 @@ class Variant { void init_empty(T &&t) { LOG_CHECK(offset_ == npos) << offset_ #if TD_CLANG || TD_GCC - << ' ' << __PRETTY_FUNCTION__ + << ' ' << __PRETTY_FUNCTION__ #endif ; offset_ = offset(); diff --git a/tdutils/td/utils/tl_parsers.cpp b/tdutils/td/utils/tl_parsers.cpp index b4e6c86f..6d9f3d8a 100644 --- a/tdutils/td/utils/tl_parsers.cpp +++ b/tdutils/td/utils/tl_parsers.cpp @@ -22,7 +22,7 @@ void TlParser::set_error(const string &error_message) { data = empty_data; CHECK(error_pos != std::numeric_limits::max()); LOG_CHECK(data_len == 0) << data_len << " " << left_len << " " << data << " " << &empty_data[0] << " " << error_pos - << " " << error; + << " " << error; CHECK(left_len == 0); } }