AsyncShaderCompiler: use std::make_unique in CreateWorkItem()

Same behavior, simpler code.
This commit is contained in:
Lioncash 2017-09-02 14:07:57 -04:00
parent 62615c601e
commit 6f97e3faa6
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ public:
template <typename T, typename... Params> template <typename T, typename... Params>
static WorkItemPtr CreateWorkItem(Params&&... params) static WorkItemPtr CreateWorkItem(Params&&... params)
{ {
return std::unique_ptr<WorkItem>(new T(std::forward<Params>(params)...)); return std::make_unique<T>(std::forward<Params>(params)...);
} }
void QueueWorkItem(WorkItemPtr item); void QueueWorkItem(WorkItemPtr item);