refactor: replace unique_ptr to shared_ptr

This commit is contained in:
k0t9i
2023-02-10 18:49:47 +04:00
parent bb4538794b
commit 81e26a7e52
13 changed files with 51 additions and 67 deletions

View File

@@ -12,9 +12,9 @@ namespace Interlude
PlayerFactory() = default;
virtual ~PlayerFactory() = default;
std::unique_ptr<Entities::Player> Create(const User* item) const
std::shared_ptr<Entities::Player> Create(const User* item) const
{
return std::make_unique<Entities::Player>(
return std::make_shared<Entities::Player>(
item->objectId,
ValueObjects::Transform(
ValueObjects::Vector3(item->pawn->Location.x, item->pawn->Location.y, item->pawn->Location.z),