From ff4fc1ad4e91e3da9cd8c011f30473a19a3d47bd Mon Sep 17 00:00:00 2001 From: Shauren Date: Thu, 4 Jul 2024 22:56:00 +0200 Subject: Core/Vmaps: Replace manual reference counting with shared_ptr and slightly reduce memory use by deduplicating model name strings --- src/common/Collision/Models/GameObjectModel.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/common/Collision/Models/GameObjectModel.h') diff --git a/src/common/Collision/Models/GameObjectModel.h b/src/common/Collision/Models/GameObjectModel.h index f875d9e3197..1cfe27a050e 100644 --- a/src/common/Collision/Models/GameObjectModel.h +++ b/src/common/Collision/Models/GameObjectModel.h @@ -18,12 +18,11 @@ #ifndef _GAMEOBJECT_MODEL_H #define _GAMEOBJECT_MODEL_H -#include -#include +#include "Define.h" #include +#include #include - -#include "Define.h" +#include #include namespace G3D @@ -91,7 +90,7 @@ private: G3D::Vector3 iPos; float iInvScale; float iScale; - VMAP::WorldModel* iModel; + std::shared_ptr iModel; std::unique_ptr owner; }; -- cgit v1.2.3