summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-09-25 17:17:01 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-09-25 17:17:01 +0200
commit489e66b39dab9aebbf1882d3f0801d242a1e1017 (patch)
tree91a0c40a6312bc6cd9efc285c6ebebb7866bdcde
parent31ba3d49aa90854408d9adc101f4346c23ee069f (diff)
zz
-rw-r--r--src/path-search.cpp2
-rw-r--r--test/path-search.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/path-search.cpp b/src/path-search.cpp
index bb342bbf..e6082d67 100644
--- a/src/path-search.cpp
+++ b/src/path-search.cpp
@@ -62,7 +62,7 @@ bool path_search::is_passable(world& w, chunk_coords_ ch0, Vector2 min, Vector2
{
static_assert(iTILE_SIZE2.x() == iTILE_SIZE2.y());
constexpr auto chunk_size = iTILE_SIZE2 * TILE_MAX_DIM;
- constexpr auto bbox_size = Vector2i(1 << sizeof(Vector2b().x())*8);
+ constexpr auto bbox_size = Vector2i(1 << sizeof(Vector2b::Type)*8);
constexpr auto chunk_max = chunk_size + bbox_size;
const auto off = Vector2(nb)*Vector2(chunk_size);
diff --git a/test/path-search.cpp b/test/path-search.cpp
index 6fad1fa5..2ed78530 100644
--- a/test/path-search.cpp
+++ b/test/path-search.cpp
@@ -91,7 +91,8 @@ void test_bbox()
auto w = world();
auto& c = test_app::make_test_chunk(w, ch);
- constexpr auto is_passable_NESW = [](chunk& c, Vector2i coord, std::array<bool, 4> dirs) {
+ constexpr auto is_passable_NESW = [](chunk& c, Vector2i coord, std::array<bool, 4> dirs)
+ {
fm_assert(is_passable_1(c, bbox(coord, N)) == dirs[0]);
fm_assert(is_passable_1(c, bbox(coord, E)) == dirs[1]);
fm_assert(is_passable_1(c, bbox(coord, S)) == dirs[2]);