summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-02-05 14:44:09 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-02-06 03:51:58 +0100
commit31860896302ccbac677ac670c43c3b5b8b857192 (patch)
treee8899b944fce2044f665b9dcc401fec17957d76d /src
parent45868d4a4057c012caccafee21c1f1169e0ef8ca (diff)
style only
Diffstat (limited to 'src')
-rw-r--r--src/chunk-walls.cpp2
-rw-r--r--src/dijkstra.cpp2
-rw-r--r--src/raycast.cpp2
-rw-r--r--src/wall-atlas.cpp1
4 files changed, 3 insertions, 4 deletions
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<const Quads::indexes> 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<int>(Math::Vector2<int> p0, Math::Vector2<int>
template<bool EnableDiagnostics>
raycast_result_s do_raycasting(std::conditional_t<EnableDiagnostics, raycast_diag_s&, std::nullptr_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 <utility>
-#include <Corrade/Containers/ArrayViewStl.h>
#include <Corrade/Containers/StridedArrayView.h>
#include <Magnum/ImageView.h>
#include <Magnum/GL/TextureFormat.h>