Core/Misc: Fix issues reported by static analysis (#25351)

* Core/Misc: Fix issues reported by static analysis

* Core/Vmaps: Code cleanup after e777161888

(cherry picked from commit cfc8f7b442)
This commit is contained in:
Giacomo Pozzoni
2020-08-29 13:02:42 +02:00
committed by Shauren
parent fc49ba2f85
commit 99ee958e0a
12 changed files with 19 additions and 18 deletions

View File

@@ -98,7 +98,7 @@ void LoadGameObjectModelList(std::string const& dataPath)
GameObjectModel::~GameObjectModel()
{
if (iModel)
((VMAP::VMapManager2*)VMAP::VMapFactory::createOrGetVMapManager())->releaseModelInstance(iModel->GetName());
VMAP::VMapFactory::createOrGetVMapManager()->releaseModelInstance(iModel->GetName());
}
bool GameObjectModel::initialize(std::unique_ptr<GameObjectModelOwnerBase> modelOwner, std::string const& dataPath)
@@ -115,7 +115,7 @@ bool GameObjectModel::initialize(std::unique_ptr<GameObjectModelOwnerBase> model
return false;
}
iModel = ((VMAP::VMapManager2*)VMAP::VMapFactory::createOrGetVMapManager())->acquireModelInstance(dataPath + "vmaps/", it->second.name);
iModel = VMAP::VMapFactory::createOrGetVMapManager()->acquireModelInstance(dataPath + "vmaps/", it->second.name);
if (!iModel)
return false;