From c7831159744703f1729bb67a56e1919c24cd0108 Mon Sep 17 00:00:00 2001 From: levlam Date: Mon, 31 Jan 2022 22:00:00 +0300 Subject: [PATCH] Fix warnings. --- td/telegram/MessagesManager.cpp | 2 +- tdutils/td/utils/emoji.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 54781d293..879cdc3b9 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -7068,7 +7068,7 @@ vector> 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, diff --git a/tdutils/td/utils/emoji.cpp b/tdutils/td/utils/emoji.cpp index 4f3e9ae54..e009f01f5 100644 --- a/tdutils/td/utils/emoji.cpp +++ b/tdutils/td/utils/emoji.cpp @@ -16,7 +16,7 @@ namespace td { bool is_emoji(Slice str) { constexpr size_t MAX_EMOJI_LENGTH = 35; - static const std::unordered_set emojis = [MAX_EMOJI_LENGTH] { + static const std::unordered_set 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);