summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-02-28 22:30:16 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-02-28 22:30:16 +0100
commita647f56b3a07da357b2ef5fd95b09df6dfb72a31 (patch)
tree9369c1541d59442da006a4ebed672765286d79a1
parentefa8631ad22c370f88950e2454665c5f10eb7452 (diff)
fix a couple msvc warnings
-rw-r--r--bench/raycast.cpp2
-rw-r--r--serialize/packbits-read.cpp2
-rw-r--r--src/chunk-region.cpp4
-rw-r--r--test/raycast.cpp2
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<uint8_t, 8>{0}, std::index_sequence<>{});
- [[maybe_unused]] f32<2> a, b, c;
+ //f32<2> a, b, c;
//read_(std::tuple<>{}, input<uint8_t, 8>{1}, std::index_sequence<>{});
//read_(std::tie(a, b, c), input<uint8_t, 5>{0b11111}, std::make_index_sequence<3>{});
//(void)input<uint8_t, 9>{};
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)