mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Refactors smart pointers creation, reduces code duplication and improves exception safety.
This was SVN commit r24915.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user