diff --git a/src/game_map.cpp b/src/game_map.cpp index 3838f2536c..2d628f5be0 100644 --- a/src/game_map.cpp +++ b/src/game_map.cpp @@ -738,7 +738,7 @@ static bool WouldCollide(const Game_Character& self, const T& other, bool self_c } } if constexpr (impl == Game_Map::eImpl_AssertWayForeground || impl == Game_Map::eImpl_AssertWayBackground) { - constexpr auto rng_moves = { + const auto rng_moves = { lcf::rpg::EventPage::MoveType_random, lcf::rpg::EventPage::MoveType_toward, lcf::rpg::EventPage::MoveType_away @@ -823,6 +823,8 @@ static bool WouldCollide(const Game_Character& self, const T& other, bool self_c move_success = other.CheckMove(other.GetDirectionAwayCharacter(*Main_Data::game_player)); } break; + default: + break; } if (move_success) { return false; diff --git a/src/scene_debug.cpp b/src/scene_debug.cpp index c41c0d835d..2e73ddbf33 100644 --- a/src/scene_debug.cpp +++ b/src/scene_debug.cpp @@ -832,7 +832,7 @@ void Scene_Debug::UpdateRangeListWindow() { skip_items--; continue; } - auto& [evt_id, state] = bg_states.GetEventInterpreter(i); + const auto& [evt_id, state] = bg_states.GetEventInterpreter(i); addItem(fmt::format("{}EV{:04d}: {}", state.wait_movement ? "(W) " : "", evt_id, Game_Map::GetEvent(evt_id)->GetName())); count_items++; } @@ -841,7 +841,7 @@ void Scene_Debug::UpdateRangeListWindow() { skip_items--; continue; } - auto& [ce_id, state] = bg_states.GetCommonEventInterpreter(i); + const auto& [ce_id, state] = bg_states.GetCommonEventInterpreter(i); auto* ce = lcf::ReaderUtil::GetElement(lcf::Data::commonevents, ce_id); addItem(fmt::format("{}CE{:04d}: {}", state.wait_movement ? "(W) " : "", ce_id, ce->name)); count_items++;