feat: use shared_ptr for object state

This commit is contained in:
k0t9i
2023-01-23 23:40:51 +04:00
parent 3ccdf1d9e4
commit 032581512d
9 changed files with 19 additions and 22 deletions

View File

@@ -15,7 +15,7 @@ namespace Interlude
class HeroRepository : public Repositories::EntityRepositoryInterface
{
public:
const std::vector<DTO::EntityState*> GetEntities() override
const std::vector<std::shared_ptr<DTO::EntityState>> GetEntities() override
{
auto hero = m_NetworkHandler.GetHero();
@@ -41,7 +41,7 @@ namespace Interlude
return m_Factory.Create(item);
});
auto result = std::vector<DTO::EntityState*>();
auto result = std::vector<std::shared_ptr<DTO::EntityState>>();
for (const auto kvp : objects)
{