[App] Use make_unique when creating a derived type instance.

This commit is contained in:
gibbed 2019-08-03 20:46:03 -05:00
parent 02ea74becd
commit f2dac86b3f
1 changed files with 1 additions and 1 deletions

View File

@ -90,7 +90,7 @@ class Factory {
template <typename DT>
void Add(const std::string& name) {
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)...);
});
}