diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2024-04-08 17:05:16 +0200 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-04-08 19:40:10 +0200 |
| commit | 064379bd0bd929f6b87c50f740e9a783b4d9e054 (patch) | |
| tree | b717428ace85bde06fff19ac96b11d95787b538f /src/critter.cpp | |
| parent | 4eefaf4e12199c071d2e6ee0d99b46d2e1d45557 (diff) | |
a
Diffstat (limited to 'src/critter.cpp')
| -rw-r--r-- | src/critter.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
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, 3> 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<rotation r> constexpr uint8_t get_length_axis() |
