From 2ba41ac279a46784ec0ac9aaaa255eb6b60fa16e Mon Sep 17 00:00:00 2001 From: levlam Date: Mon, 9 Jan 2023 10:46:49 +0300 Subject: [PATCH] Explicitly use std::move to return entities. --- td/telegram/MessageEntity.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/td/telegram/MessageEntity.cpp b/td/telegram/MessageEntity.cpp index 377ac824e..015a9034b 100644 --- a/td/telegram/MessageEntity.cpp +++ b/td/telegram/MessageEntity.cpp @@ -1964,7 +1964,7 @@ Result> parse_markdown(string &text) { } } text = std::move(result); - return entities; + return std::move(entities); } static Result> do_parse_markdown_v2(CSlice text, string &result) { @@ -2222,14 +2222,14 @@ static Result> do_parse_markdown_v2(CSlice text, string &r sort_entities(entities); - return entities; + return std::move(entities); } Result> parse_markdown_v2(string &text) { string result; TRY_RESULT(entities, do_parse_markdown_v2(text, result)); text = std::move(result); - return entities; + return std::move(entities); } static vector find_text_url_entities_v3(Slice text) { @@ -3226,7 +3226,7 @@ static Result> do_parse_html(CSlice text, string &result) sort_entities(entities); - return entities; + return std::move(entities); } Result> parse_html(string &text) { @@ -3238,7 +3238,7 @@ Result> parse_html(string &text) { "surrogate code units"); } text = std::move(result); - return entities; + return std::move(entities); } vector> get_input_secret_message_entities( @@ -3443,7 +3443,7 @@ Result> get_message_entities(const ContactsManager *contac entities.pop_back(); } } - return entities; + return std::move(entities); } vector get_message_entities(const ContactsManager *contacts_manager,