From 2bff8c999edde11270ecaf6fbd2d24f54d0e360b Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 29 Jun 2022 22:15:36 +0200 Subject: refactor: cell helper take matrix as shared pointer --- src/game/cell_helper.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/game/cell_helper.hpp') diff --git a/src/game/cell_helper.hpp b/src/game/cell_helper.hpp index ee5ab27..cf84a75 100644 --- a/src/game/cell_helper.hpp +++ b/src/game/cell_helper.hpp @@ -13,7 +13,7 @@ template class CellHelper : public ICellHelper { public: - explicit CellHelper(const IMatrix &matrix) noexcept; + explicit CellHelper(std::shared_ptr> matrix) noexcept; [[nodiscard]] auto is_cell_dying(const Vector2 &cell_pos) const noexcept -> bool override; @@ -26,7 +26,7 @@ public: -> std::vector override; private: - const IMatrix &_matrix; + std::shared_ptr> _matrix; static auto _get_position_neighbours(const Vector2 &position) noexcept -> std::list; -- cgit v1.2.3-18-g5258