From 31860896302ccbac677ac670c43c3b5b8b857192 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 5 Feb 2024 14:44:09 +0100 Subject: style only --- src/chunk-walls.cpp | 2 +- src/dijkstra.cpp | 2 +- src/raycast.cpp | 2 +- src/wall-atlas.cpp | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/chunk-walls.cpp b/src/chunk-walls.cpp index 674d0a65..4efe6935 100644 --- a/src/chunk-walls.cpp +++ b/src/chunk-walls.cpp @@ -126,7 +126,7 @@ ArrayView make_indexes(size_t max) return indexes.prefix(max); } -constexpr auto depth_offset_for_group(Group_ G, bool is_west) +constexpr float depth_offset_for_group(Group_ G, bool is_west) { CORRADE_ASSUME(G < Group_::COUNT); float p = is_west ? tile_shader::wall_west_offset : 0; diff --git a/src/dijkstra.cpp b/src/dijkstra.cpp index 4bdb3ab7..c1dcd4d6 100644 --- a/src/dijkstra.cpp +++ b/src/dijkstra.cpp @@ -373,7 +373,7 @@ struct chunk_cache x *= i; return x; }(); - static constexpr size_t rank = sizeof(dimensions)/sizeof(dimensions[0]); + static constexpr size_t rank = arraySize(dimensions); struct index { uint32_t value = 0; }; class chunk* chunk = nullptr; diff --git a/src/raycast.cpp b/src/raycast.cpp index b6ed2158..1ca75db2 100644 --- a/src/raycast.cpp +++ b/src/raycast.cpp @@ -111,7 +111,7 @@ template bool within_chunk_bounds(Math::Vector2 p0, Math::Vector2 template raycast_result_s do_raycasting(std::conditional_t diag, - world& w, point from, point to, object_id self) + world& w, point from, point to, object_id self) { raycast_result_s result; fm_assert(from.chunk3().z == to.chunk3().z); diff --git a/src/wall-atlas.cpp b/src/wall-atlas.cpp index 49c7d342..60568751 100644 --- a/src/wall-atlas.cpp +++ b/src/wall-atlas.cpp @@ -2,7 +2,6 @@ #include "compat/exception.hpp" #include "src/tile-defs.hpp" #include -#include #include #include #include -- cgit v1.2.3