Преглед на файлове

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

+ 0 - 1
game/PlayingState.cxx

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