Skip to content

Commit

Permalink
Minor improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
levlam committed Apr 25, 2024
1 parent 73ccba7 commit 337b193
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions td/telegram/BusinessConnectionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 2 additions & 4 deletions td/telegram/MessageQuote.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -192,8 +190,8 @@ int32 MessageQuote::search_quote(FormattedText &&text, FormattedText &&quote, in
fix_entities(text.entities);
remove_empty_entities(text.entities);
};
int32 length = narrow_cast<int32>(utf8_utf16_length(text.text));
int32 quote_length = narrow_cast<int32>(utf8_utf16_length(quote.text));
auto length = narrow_cast<int32>(utf8_utf16_length(text.text));
auto quote_length = narrow_cast<int32>(utf8_utf16_length(quote.text));
if (quote_length == 0 || quote_length > length) {
return -1;
}
Expand Down

0 comments on commit 337b193

Please sign in to comment.