Minor improvements.

GitOrigin-RevId: eb8b201d80405feb6972b2eabc7de30d40aa8b81
This commit is contained in:
levlam 2020-11-02 00:43:57 +03:00
parent 301c8b167f
commit c1de6a7d8d
5 changed files with 5 additions and 9 deletions

View File

@ -1388,11 +1388,8 @@ void InlineQueriesManager::on_get_inline_query_results(UserId bot_user_id, uint6
Location l(inline_message_geo->geo_);
location->location_ = l.get_location_object();
} else {
Slice latitude;
Slice longitude;
Slice horizontal_accuracy;
std::tie(latitude, longitude) = split(Slice(result->description_));
Location l(to_double(latitude), to_double(longitude), 0.0, 0);
auto latitude_longitude = split(Slice(result->description_));
Location l(to_double(latitude_longitude.first), to_double(latitude_longitude.second), 0.0, 0);
location->location_ = l.get_location_object();
}
location->thumbnail_ = register_thumbnail(std::move(result->thumb_));

View File

@ -33,8 +33,8 @@
#include "td/telegram/MessageEntity.h"
#include "td/telegram/MessageEntity.hpp"
#include "td/telegram/MessageId.h"
#include "td/telegram/MessagesManager.h"
#include "td/telegram/MessageSearchFilter.h"
#include "td/telegram/MessagesManager.h"
#include "td/telegram/misc.h"
#include "td/telegram/net/DcId.h"
#include "td/telegram/Payments.h"

View File

@ -6971,7 +6971,7 @@ void MessagesManager::on_user_dialog_action(DialogId dialog_id, MessageId top_th
if (td_->auth_manager_->is_bot() || !user_id.is_valid() || is_broadcast_channel(dialog_id)) {
return;
}
if (!td_->messages_manager_->have_dialog(dialog_id)) {
if (!have_dialog(dialog_id)) {
LOG(DEBUG) << "Ignore typing in unknown " << dialog_id;
return;
}

View File

@ -8,7 +8,6 @@
#include "td/telegram/AnimationsManager.h"
#include "td/telegram/AudiosManager.h"
#include "td/telegram/ContactsManager.h"
#include "td/telegram/DocumentsManager.h"
#include "td/telegram/Global.h"
#include "td/telegram/MessagesManager.h"

View File

@ -391,7 +391,7 @@ class SocketFdImpl {
auto write_res = detail::skip_eintr([&] {
#ifdef MSG_NOSIGNAL
msghdr msg;
memset(&msg, 0, sizeof(msg));
std::memset(&msg, 0, sizeof(msg));
msg.msg_iov = const_cast<iovec *>(slices.begin());
msg.msg_iovlen = slices_size;
return sendmsg(native_fd, &msg, MSG_NOSIGNAL);