[jasper/world] Fix compiler warnings
All checks were successful
Build / build (push) Successful in 3m49s

This commit is contained in:
Gary Talent 2025-01-14 01:25:12 -06:00
parent 1d185e2036
commit 3fdcf49b65

View File

@ -17,20 +17,16 @@ namespace jasper::world {
namespace ncore = nostalgia::core;
constexpr void setTopEdge(uint8_t &layerAttachments, uint8_t const val) noexcept {
auto const val8 = static_cast<uint8_t>(val);
layerAttachments = (layerAttachments & 0b11111100) | val8;
layerAttachments = static_cast<uint8_t>((layerAttachments & 0b11111100) | val);
}
constexpr void setBottomEdge(uint8_t &layerAttachments, uint8_t const val) noexcept {
auto const val8 = static_cast<uint8_t>(val);
layerAttachments = (layerAttachments & 0b11110011) | (val8 << 2);
layerAttachments = static_cast<uint8_t>((layerAttachments & 0b11110011) | (val << 2));
}
constexpr void setLeftEdge(uint8_t &layerAttachments, uint8_t const val) noexcept {
auto const val8 = static_cast<uint8_t>(val);
layerAttachments = (layerAttachments & 0b11001111) | (val8 << 4);
layerAttachments = static_cast<uint8_t>((layerAttachments & 0b11001111) | (val << 4));
}
constexpr void setRightEdge(uint8_t &layerAttachments, uint8_t const val) noexcept {
auto const val8 = static_cast<uint8_t>(val);
layerAttachments = (layerAttachments & 0b00111111) | (val8 << 6);
layerAttachments = static_cast<uint8_t>((layerAttachments & 0b00111111) | (val << 6));
}
[[nodiscard]]
@ -161,7 +157,7 @@ constexpr size_t layers(WorldStatic const&ws) noexcept {
[[nodiscard]]
auto &tile(
ox::CommonRefWith<WorldStatic> auto&ws,
size_t lyr,
size_t const lyr,
ox::IntegerRange_c<500> auto col,
ox::IntegerRange_c<500> auto row) noexcept {
auto const idx = static_cast<size_t>(row) * static_cast<size_t>(ws.columns) + static_cast<size_t>(col);