AsyncShaderCompiler: use std::make_unique in CreateWorkItem()
Same behavior, simpler code.
This commit is contained in:
parent
62615c601e
commit
6f97e3faa6
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue