From 4e41c5cf248c9be09d54dd5947d8f3ead4df25e0 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Mon, 29 Aug 2022 10:43:33 +0200 Subject: [PATCH] code: Revert #836 The compiler will choose the optimal way automatically, and forcing std::move here actually results in two objects existing side by side, before being "moved" into one. --- source/ffmpeg/hwapi/d3d11.cpp | 2 +- source/ffmpeg/tools.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ffmpeg/hwapi/d3d11.cpp b/source/ffmpeg/hwapi/d3d11.cpp index d215ff52..af27314a 100644 --- a/source/ffmpeg/hwapi/d3d11.cpp +++ b/source/ffmpeg/hwapi/d3d11.cpp @@ -99,7 +99,7 @@ std::list d3d11::enumerate_adapters() adapters.push_back(dev); } - return std::move(adapters); + return adapters; } std::shared_ptr d3d11::create(const device& target) diff --git a/source/ffmpeg/tools.cpp b/source/ffmpeg/tools.cpp index 7f94303b..013be635 100644 --- a/source/ffmpeg/tools.cpp +++ b/source/ffmpeg/tools.cpp @@ -280,7 +280,7 @@ std::vector tools::get_software_formats(const AVPixelFormat* list fmts.push_back(AV_PIX_FMT_NONE); - return std::move(fmts); + return fmts; } void tools::context_setup_from_obs(const video_output_info* voi, AVCodecContext* context)