Fix warnings.

This commit is contained in:
levlam 2022-01-31 22:00:00 +03:00
parent d5d6e520e0
commit c783115974
2 changed files with 3 additions and 3 deletions

View File

@ -7068,7 +7068,7 @@ vector<td_api::object_ptr<td_api::unreadReaction>> MessagesManager::get_unread_r
unread_reactions.push_back(std::move(unread_reaction_object));
}
}
return std::move(unread_reactions);
return unread_reactions;
}
bool MessagesManager::update_message_interaction_info(DialogId dialog_id, Message *m, int32 view_count,

View File

@ -16,7 +16,7 @@ namespace td {
bool is_emoji(Slice str) {
constexpr size_t MAX_EMOJI_LENGTH = 35;
static const std::unordered_set<Slice, SliceHash> emojis = [MAX_EMOJI_LENGTH] {
static const std::unordered_set<Slice, SliceHash> emojis = [max_emoji_length = MAX_EMOJI_LENGTH] {
#if TD_HAVE_ZLIB
Slice packed_emojis(
"eJyNnety27i2rV8lVfvf-XXul7frVmfZ6cS6kKJskrLj7tUUaUmOI1uObcUEWLUfJecBdledFzgaJIfJiUkyqyqAJ4wxJzE_QABF2fGPs_"
@ -213,7 +213,7 @@ bool is_emoji(Slice str) {
}
CHECK(j < all_emojis_str.size());
all_emojis.insert(Slice(&all_emojis_str[i], &all_emojis_str[j]));
CHECK(j - i <= MAX_EMOJI_LENGTH);
CHECK(j - i <= max_emoji_length);
i = j;
}
CHECK(all_emojis.size() == EMOJI_COUNT);