diff --git a/DungeonTemplateLibrary/Beta_BoardGame.hpp b/DungeonTemplateLibrary/Beta_BoardGame.hpp index 2f5af75..bfc6007 100644 --- a/DungeonTemplateLibrary/Beta_BoardGame.hpp +++ b/DungeonTemplateLibrary/Beta_BoardGame.hpp @@ -218,7 +218,7 @@ namespace dtl::generator::boardGame { create(matrix_, black_, white_); } template - constexpr void create(Matrix_& matrix_, const Matrix_Int_ black_ = 2, const Matrix_Int_ white_ = 1) noexcept { + constexpr void create(Matrix_& matrix_, const Matrix_Int_ black_ = 2, const Matrix_Int_ white_ = 1) const noexcept { createReversi(matrix_, black_, white_); } }; @@ -346,7 +346,7 @@ namespace dtl::generator::boardGame { create(matrix_); } template - constexpr void create(Matrix_& matrix_) noexcept { + constexpr void create(Matrix_& matrix_) const noexcept { dtl::generator::boardGame::stl::createChess(matrix_); } }; @@ -391,7 +391,7 @@ namespace dtl::generator::boardGame { create(matrix_, x_, y_); } template - constexpr void create(Matrix_& matrix_, const std::size_t x_, const std::size_t y_) noexcept { + constexpr void create(Matrix_& matrix_, const std::size_t x_, const std::size_t y_) const noexcept { dtl::generator::boardGame::normal::createChess(matrix_, x_, y_); } }; @@ -419,7 +419,7 @@ namespace dtl::generator::puzzle::tool { bool visited{}; std::vector> next{}; - KnightTourNode(const std::int_fast32_t row_, const std::int_fast32_t col_) noexcept : row(row_), col(col_), visited(false) {} + explicit KnightTourNode(const std::int_fast32_t row_, const std::int_fast32_t col_) noexcept : row(row_), col(col_), visited(false) {} }; class KnightTourIsUnvisited { @@ -436,7 +436,7 @@ namespace dtl::generator::puzzle::tool { private: std::size_t counter{}; public: - KnightTourNotEqualUnvisited(const std::shared_ptr& node_) noexcept : counter(static_cast(std::count_if(node_->next.begin(), node_->next.end(), KnightTourIsUnvisited()))) { } + explicit KnightTourNotEqualUnvisited(const std::shared_ptr& node_) noexcept : counter(static_cast(std::count_if(node_->next.begin(), node_->next.end(), KnightTourIsUnvisited()))) { } bool operator()(const std::shared_ptr& node_) const noexcept { return static_cast(std::count_if(node_->next.begin(), node_->next.end(), KnightTourIsUnvisited())) != counter; } diff --git a/DungeonTemplateLibrary/Generator_Common_OneLine.hpp b/DungeonTemplateLibrary/Generator_Common_OneLine.hpp index db4a66e..14ffae6 100644 --- a/DungeonTemplateLibrary/Generator_Common_OneLine.hpp +++ b/DungeonTemplateLibrary/Generator_Common_OneLine.hpp @@ -82,7 +82,7 @@ namespace dtl::generator::common::stl { create(matrix_, value_); } template - constexpr void create(Matrix_& matrix_, const Matrix_Int_ value_ = 1) noexcept { + constexpr void create(Matrix_& matrix_, const Matrix_Int_ value_ = 1) const noexcept { createOneLineDown(matrix_, value_); } }; @@ -97,7 +97,7 @@ namespace dtl::generator::common::stl { create(matrix_, value_); } template - constexpr void create(Matrix_& matrix_, const Matrix_Int_ value_ = 1) noexcept { + constexpr void create(Matrix_& matrix_, const Matrix_Int_ value_ = 1) const noexcept { createOneLineUp(matrix_, value_); } }; @@ -112,7 +112,7 @@ namespace dtl::generator::common::stl { create(matrix_, value_); } template - constexpr void create(Matrix_& matrix_, const Matrix_Int_ value_ = 1) noexcept { + constexpr void create(Matrix_& matrix_, const Matrix_Int_ value_ = 1) const noexcept { createOneLineLeft(matrix_, value_); } }; @@ -127,7 +127,7 @@ namespace dtl::generator::common::stl { create(matrix_, value_); } template - constexpr void create(Matrix_& matrix_, const Matrix_Int_ value_ = 1) noexcept { + constexpr void create(Matrix_& matrix_, const Matrix_Int_ value_ = 1) const noexcept { createOneLineRight(matrix_, value_); } }; @@ -437,7 +437,7 @@ namespace dtl::generator::common::layer::stl { create(matrix_, layer_, value_); } template - constexpr void create(Matrix_& matrix_, const std::size_t layer_, const Matrix_Int_ value_ = 1) noexcept { + constexpr void create(Matrix_& matrix_, const std::size_t layer_, const Matrix_Int_ value_ = 1) const noexcept { createOneLineDown(matrix_, layer_, value_); } }; @@ -452,7 +452,7 @@ namespace dtl::generator::common::layer::stl { create(matrix_, layer_, value_); } template - constexpr void create(Matrix_& matrix_, const std::size_t layer_, const Matrix_Int_ value_ = 1) noexcept { + constexpr void create(Matrix_& matrix_, const std::size_t layer_, const Matrix_Int_ value_ = 1) const noexcept { createOneLineUp(matrix_, layer_, value_); } }; @@ -467,7 +467,7 @@ namespace dtl::generator::common::layer::stl { create(matrix_, layer_, value_); } template - constexpr void create(Matrix_& matrix_, const std::size_t layer_, const Matrix_Int_ value_ = 1) noexcept { + constexpr void create(Matrix_& matrix_, const std::size_t layer_, const Matrix_Int_ value_ = 1) const noexcept { createOneLineLeft(matrix_, layer_, value_); } }; @@ -482,7 +482,7 @@ namespace dtl::generator::common::layer::stl { create(matrix_, layer_, value_); } template - constexpr void create(Matrix_& matrix_, const std::size_t layer_, const Matrix_Int_ value_ = 1) noexcept { + constexpr void create(Matrix_& matrix_, const std::size_t layer_, const Matrix_Int_ value_ = 1) const noexcept { createOneLineRight(matrix_, layer_, value_); } }; diff --git a/DungeonTemplateLibrary/Generator_Common_PointGrid.hpp b/DungeonTemplateLibrary/Generator_Common_PointGrid.hpp index 1afbe03..2d0434a 100644 --- a/DungeonTemplateLibrary/Generator_Common_PointGrid.hpp +++ b/DungeonTemplateLibrary/Generator_Common_PointGrid.hpp @@ -191,7 +191,7 @@ namespace dtl::generator::common::layer::normal { create(matrix_, layer_, x_, y_, value_); } template - constexpr void create(Matrix_& matrix_, const std::size_t layer_, const std::size_t x_, const std::size_t y_, const Matrix_Int_ value_ = 1) noexcept { + constexpr void create(Matrix_& matrix_, const std::size_t layer_, const std::size_t x_, const std::size_t y_, const Matrix_Int_ value_ = 1) const noexcept { createPointGrid(matrix_, layer_, x_, y_, value_); } };