mirror of https://github.com/AxioDL/metaforce.git
Editor/ProjectManager: Make use of std::make_unique
Same thing with a more straightforward syntax.
This commit is contained in:
parent
43e808ff17
commit
a65b32892e
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue