From 337b193026edc4df4fe9b46d37970ad908fd8dfc Mon Sep 17 00:00:00 2001 From: levlam Date: Thu, 25 Apr 2024 16:37:20 +0300 Subject: [PATCH] Minor improvements. --- td/telegram/BusinessConnectionManager.cpp | 1 + td/telegram/MessageQuote.cpp | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/td/telegram/BusinessConnectionManager.cpp b/td/telegram/BusinessConnectionManager.cpp index edc245228..6303e7b15 100644 --- a/td/telegram/BusinessConnectionManager.cpp +++ b/td/telegram/BusinessConnectionManager.cpp @@ -19,6 +19,7 @@ #include "td/telegram/MessageCopyOptions.h" #include "td/telegram/MessageEntity.h" #include "td/telegram/MessageId.h" +#include "td/telegram/MessageQuote.h" #include "td/telegram/MessageSelfDestructType.h" #include "td/telegram/MessagesManager.h" #include "td/telegram/ReplyMarkup.h" diff --git a/td/telegram/MessageQuote.cpp b/td/telegram/MessageQuote.cpp index 7d43e7dc9..9000425ab 100644 --- a/td/telegram/MessageQuote.cpp +++ b/td/telegram/MessageQuote.cpp @@ -12,10 +12,8 @@ #include "td/telegram/OptionManager.h" #include "td/telegram/Td.h" #include "td/telegram/telegram_api.h" -#include "td/telegram/UserManager.h" #include "td/utils/algorithm.h" -#include "td/utils/logging.h" #include "td/utils/misc.h" #include "td/utils/Slice.h" #include "td/utils/utf8.h" @@ -192,8 +190,8 @@ int32 MessageQuote::search_quote(FormattedText &&text, FormattedText &"e, in fix_entities(text.entities); remove_empty_entities(text.entities); }; - int32 length = narrow_cast(utf8_utf16_length(text.text)); - int32 quote_length = narrow_cast(utf8_utf16_length(quote.text)); + auto length = narrow_cast(utf8_utf16_length(text.text)); + auto quote_length = narrow_cast(utf8_utf16_length(quote.text)); if (quote_length == 0 || quote_length > length) { return -1; }