From 064379bd0bd929f6b87c50f740e9a783b4d9e054 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 8 Apr 2024 17:05:16 +0200 Subject: a --- src/critter.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/critter.cpp') diff --git a/src/critter.cpp b/src/critter.cpp index d7fc8627..0fb3e406 100644 --- a/src/critter.cpp +++ b/src/critter.cpp @@ -26,7 +26,6 @@ constexpr auto arrows_to_dir(bool left, bool right, bool up, bool down) switch (bits) { - default: std::unreachable(); // -Wswitch-default using enum rotation; case L | U: return W; case L | D: return S; @@ -47,6 +46,7 @@ constexpr auto arrows_to_dir(bool left, bool right, bool up, bool down) case L|R: return rotation{rotation_COUNT}; } + std::unreachable(); } #if 0 static_assert(arrows_to_dir(true, false, false, false) == rotation::SW); @@ -93,10 +93,8 @@ constexpr std::array rotation_to_similar(rotation r) case SW: return { SW, S, W }; case W: return { W, SW, NW }; case NW: return { NW, W, N }; - default: - std::unreachable(); - fm_assert(false); } + std::unreachable(); } template constexpr uint8_t get_length_axis() -- cgit v1.2.3