Procházet zdrojové kódy

repaired build on raspberry pi

for some reason including <ranges> broke PlayingState.cxx
Felix Bytow před 1 rokem
rodič
revize
c2a894783c
2 změnil soubory, kde provedl 2 přidání a 4 odebrání
  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)