From a647f56b3a07da357b2ef5fd95b09df6dfb72a31 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 28 Feb 2024 22:30:16 +0100 Subject: fix a couple msvc warnings --- bench/raycast.cpp | 2 +- serialize/packbits-read.cpp | 2 +- src/chunk-region.cpp | 4 ++-- test/raycast.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bench/raycast.cpp b/bench/raycast.cpp index 1885c05c..0f6d617b 100644 --- a/bench/raycast.cpp +++ b/bench/raycast.cpp @@ -58,7 +58,7 @@ world make_world() auto run(point from, point to, world& w, bool b, float len) { - constexpr float fuzz = iTILE_SIZE2.x(); + constexpr float fuzz = TILE_SIZE2.x(); auto diag = rc::raycast_diag_s{}; auto res = raycast_with_diag(diag, w, from, to, 0); if (res.success != b) diff --git a/serialize/packbits-read.cpp b/serialize/packbits-read.cpp index aa5cccfe..d8b9451c 100644 --- a/serialize/packbits-read.cpp +++ b/serialize/packbits-read.cpp @@ -103,7 +103,7 @@ constexpr bool test4() } { read_(std::tuple<>{}, input{0}, std::index_sequence<>{}); - [[maybe_unused]] f32<2> a, b, c; + //f32<2> a, b, c; //read_(std::tuple<>{}, input{1}, std::index_sequence<>{}); //read_(std::tie(a, b, c), input{0b11111}, std::make_index_sequence<3>{}); //(void)input{}; diff --git a/src/chunk-region.cpp b/src/chunk-region.cpp index 8bf73231..4bb2be7b 100644 --- a/src/chunk-region.cpp +++ b/src/chunk-region.cpp @@ -156,10 +156,10 @@ auto chunk::make_pass_region(const pred& f, bool debug) -> pass_region constexpr auto dir = fours[Dir]; const auto pos = pos0 + dir; if constexpr(!Edge && (Dir == L || Dir == R)) - if ((uint32_t)pos.x() >= div_count.x()) [[unlikely]] + if ((uint32_t)pos.x() >= (uint32_t)div_count.x()) [[unlikely]] return; if constexpr(!Edge && (Dir == U || Dir == D)) - if ((uint32_t)pos.y() >= div_count.y()) [[unlikely]] + if ((uint32_t)pos.y() >= (uint32_t)div_count.y()) [[unlikely]] return; if (tmp.check_visited(ret.bits, pos, Dir) && check_pos(*this, nbs, pos, dir, f)) tmp.append(ret.bits, pos); diff --git a/test/raycast.cpp b/test/raycast.cpp index fffaae0f..3bf26cdd 100644 --- a/test/raycast.cpp +++ b/test/raycast.cpp @@ -63,7 +63,7 @@ world make_world() auto run(point from, point to, world& w, bool b, float len) { - constexpr float fuzz = iTILE_SIZE2.x(); + constexpr float fuzz = TILE_SIZE2.x(); auto diag = rc::raycast_diag_s{}; auto res = raycast_with_diag(diag, w, from, to, 0); if (res.success != b) -- cgit v1.2.3