mirror of
https://github.com/xenia-project/xenia.git
synced 2025-12-06 07:12:03 +01:00
[App] Use make_unique when creating a derived type instance.
This commit is contained in:
parent
02ea74becd
commit
f2dac86b3f
|
|
@ -90,7 +90,7 @@ class Factory {
|
||||||
template <typename DT>
|
template <typename DT>
|
||||||
void Add(const std::string& name) {
|
void Add(const std::string& name) {
|
||||||
Add(name, DT::IsAvailable, [](Args... args) {
|
Add(name, DT::IsAvailable, [](Args... args) {
|
||||||
return std::unique_ptr<DT>(new DT(std::forward<Args>(args)...));
|
return std::make_unique<DT>(std::forward<Args>(args)...);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue