Editor/ProjectManager: Make use of std::make_unique

Same thing with a more straightforward syntax.
This commit is contained in:
Lioncash 2019-08-10 05:52:06 -04:00
parent 43e808ff17
commit a65b32892e
1 changed files with 2 additions and 2 deletions

View File

@ -53,7 +53,7 @@ bool ProjectManager::newProject(hecl::SystemStringView path) {
}
hecl::MakeDir(path.data());
m_proj.reset(new hecl::Database::Project(path));
m_proj = std::make_unique<hecl::Database::Project>(path);
if (!*m_proj) {
m_proj.reset();
return false;
@ -79,7 +79,7 @@ bool ProjectManager::openProject(hecl::SystemStringView path) {
return false;
}
m_proj.reset(new hecl::Database::Project(projPath));
m_proj = std::make_unique<hecl::Database::Project>(projPath);
if (!*m_proj) {
m_proj.reset();
return false;