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

* Core/Misc: Fix issues reported by static analysis

* Core/Vmaps: Code cleanup after e777161888
# Conflicts:
#	src/common/Collision/DynamicTree.cpp
#	src/server/game/Entities/Object/Object.cpp
#	src/server/game/World/World.cpp
This commit is contained in:
Giacomo Pozzoni authored and Ovahlord committed 2020-08-29 13:49:21 +02:00
1 parent 85018f9421
commit 6a8ecc3ee3
10 files changed
+17 -18

No files matched your search

@@ -99,7 +99,7 @@ void LoadGameObjectModelList(std::string const& dataPath)
GameObjectModel::~GameObjectModel()
{
if (iModel)
((VMAP::VMapManager2*)VMAP::VMapFactory::createOrGetVMapManager())->releaseModelInstance(name);
VMAP::VMapFactory::createOrGetVMapManager()->releaseModelInstance(name);
}
bool GameObjectModel::initialize(std::unique_ptr<GameObjectModelOwnerBase> modelOwner, std::string const& dataPath)
@@ -116,7 +116,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;