2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-07-06 13:25:53 +00:00

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

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;