ソースを参照

repaired build on raspberry pi

for some reason including <ranges> broke PlayingState.cxx
Felix Bytow 1 年間 前
コミット
c2a894783c
2 ファイル変更2 行追加4 行削除
  1. 2 3
      game/GameStateManager.cxx
  2. 0 1
      game/PlayingState.cxx

+ 2 - 3
game/GameStateManager.cxx

@@ -1,6 +1,7 @@
 #include "GameStateManager.hxx"
 
 #include <cassert>
+#include <utility>
 
 GameStateManager::GameStateManager(SDLWindow& window)
     :window_{window}, states_{{GameStates::Loading}}
@@ -19,9 +20,7 @@ GameState* GameStateManager::enum_to_state(GameStates const state)
 {
   switch (state) {
   default:
-    // this should no longer be reachable as all states are handled
-    assert(false);
-    return nullptr;
+    std::unreachable();
   case GameStates::Loading:
     return &loading_;
   case GameStates::Splash:

+ 0 - 1
game/PlayingState.cxx

@@ -9,7 +9,6 @@
 #include <cmath>
 #include <iterator>
 #include <random>
-#include <ranges>
 
 namespace {
   SDL_Point head_position(SDL_FPoint const& position)