aboutsummaryrefslogtreecommitdiff
path: root/src/game/cell_helper.hpp
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-07-01 16:01:04 +0200
committerHampusM <hampus@hampusmat.com>2022-07-01 16:01:04 +0200
commit7307815e99a79dac42f2a9c06b0fe6171ea11ba0 (patch)
treead41ee819dc87fc2653caf720fa7d1df30c0caeb /src/game/cell_helper.hpp
parent2bff8c999edde11270ecaf6fbd2d24f54d0e360b (diff)
refactor: use ranges
Diffstat (limited to 'src/game/cell_helper.hpp')
-rw-r--r--src/game/cell_helper.hpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/game/cell_helper.hpp b/src/game/cell_helper.hpp
index cf84a75..c54b12e 100644
--- a/src/game/cell_helper.hpp
+++ b/src/game/cell_helper.hpp
@@ -5,7 +5,6 @@
#include "engine/data/vector2.hpp"
-#include <list>
#include <memory>
#include <vector>
@@ -19,17 +18,17 @@ public:
-> bool override;
[[nodiscard]] auto
- get_birth_cell_positions(const std::list<Vector2> &cell_positions) const noexcept
- -> std::list<Vector2> override;
+ get_birth_cell_positions(const std::vector<Vector2> &cell_positions) const noexcept
+ -> std::vector<Vector2> override;
[[nodiscard]] auto find_neighbours(const Vector2 &cell_pos) const noexcept
-> std::vector<Vector2> override;
private:
- std::shared_ptr<IMatrix<MatrixElement>> _matrix;
+ const std::shared_ptr<IMatrix<MatrixElement>> _matrix;
static auto _get_position_neighbours(const Vector2 &position) noexcept
- -> std::list<Vector2>;
+ -> std::vector<Vector2>;
};
#include "cell_helper_impl.hpp"