From 62615c601ef77926369f480cf0e0106074b0882b Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 2 Sep 2017 13:49:07 -0400 Subject: [PATCH] AsyncShaderCompiler: Forward arguments to the specified type's constructor in CreateWorkItem() As this just hands off the arguments to another type's constructor, perfect forwarding should be used here to preserve any potential move semantics. --- Source/Core/VideoCommon/AsyncShaderCompiler.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/Core/VideoCommon/AsyncShaderCompiler.h b/Source/Core/VideoCommon/AsyncShaderCompiler.h index fb117dab28..fc0bca8d72 100644 --- a/Source/Core/VideoCommon/AsyncShaderCompiler.h +++ b/Source/Core/VideoCommon/AsyncShaderCompiler.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #include "Common/CommonTypes.h" @@ -36,9 +37,9 @@ public: virtual ~AsyncShaderCompiler(); template - static WorkItemPtr CreateWorkItem(Params... params) + static WorkItemPtr CreateWorkItem(Params&&... params) { - return std::unique_ptr(new T(params...)); + return std::unique_ptr(new T(std::forward(params)...)); } void QueueWorkItem(WorkItemPtr item);