Refactors smart pointers creation, reduces code duplication and improves exception safety.

This was SVN commit r24915.
This commit is contained in:
vladislavbelov
2021-02-13 23:53:40 +00:00
parent 425f19b8ac
commit 7a71011149
21 changed files with 34 additions and 34 deletions
+1 -1
View File
@@ -280,7 +280,7 @@ CModelDef* CModelDef::Load(const VfsPath& filename, const VfsPath& name)
throw PSERROR_File_InvalidVersion();
}
std::unique_ptr<CModelDef> mdef (new CModelDef());
std::unique_ptr<CModelDef> mdef = std::make_unique<CModelDef>();
mdef->m_Name = name;
// now unpack everything