diff options
author | Shauren <shauren.trinity@gmail.com> | 2024-07-04 22:56:00 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2024-07-04 22:56:00 +0200 |
commit | ff4fc1ad4e91e3da9cd8c011f30473a19a3d47bd (patch) | |
tree | a37fc61a59a39520a88d024846a900c63988a0b0 /src/common/Collision/Models/GameObjectModel.h | |
parent | fd329ee8483da81585db484c005a6fe22448bc63 (diff) |
Core/Vmaps: Replace manual reference counting with shared_ptr and slightly reduce memory use by deduplicating model name strings
Diffstat (limited to 'src/common/Collision/Models/GameObjectModel.h')
-rw-r--r-- | src/common/Collision/Models/GameObjectModel.h | 9 |
1 files changed, 4 insertions, 5 deletions
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 <G3D/Matrix3.h> -#include <G3D/Vector3.h> +#include "Define.h" #include <G3D/AABox.h> +#include <G3D/Matrix3.h> #include <G3D/Ray.h> - -#include "Define.h" +#include <G3D/Vector3.h> #include <memory> namespace G3D @@ -91,7 +90,7 @@ private: G3D::Vector3 iPos; float iInvScale; float iScale; - VMAP::WorldModel* iModel; + std::shared_ptr<VMAP::WorldModel> iModel; std::unique_ptr<GameObjectModelOwnerBase> owner; }; |