From 3c0694280faf7e60ac4c12d6d594e12b8c21bb75 Mon Sep 17 00:00:00 2001 From: Nicholas Guriev Date: Tue, 30 Jun 2020 19:25:27 +0300 Subject: [PATCH] Fix -Wredundant-move --- Telegram/SourceFiles/storage/storage_media_prepare.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/storage/storage_media_prepare.cpp b/Telegram/SourceFiles/storage/storage_media_prepare.cpp index 48ce0d75dc..2a05a48374 100644 --- a/Telegram/SourceFiles/storage/storage_media_prepare.cpp +++ b/Telegram/SourceFiles/storage/storage_media_prepare.cpp @@ -286,7 +286,6 @@ std::optional PreparedList::PreparedFileFromFilesDialog( } if (!result.remoteContent.isEmpty()) { - auto list = Storage::PrepareMediaFromImage( QImage(), std::move(result.remoteContent), @@ -311,7 +310,7 @@ std::optional PreparedList::PreparedFileFromFilesDialog( } } Expects(list.files.size() == 1); - return std::move(list); + return list; } else if (!result.paths.isEmpty()) { const auto isSingleFile = (result.paths.size() == 1); auto temp = Storage::PrepareMediaList(result.paths, previewWidth); @@ -366,7 +365,7 @@ std::optional PreparedList::PreparedFileFromFilesDialog( list.allFilesForCompress = temp.allFilesForCompress; list.files = std::move(filteredFiles); - return std::move(list); + return list; } return std::nullopt; }