Skip to content

Commit

Permalink
Fixing GCC errors & warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
florianessl committed Jan 19, 2025
1 parent 2fd58a7 commit 5c325d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/game_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/scene_debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}
Expand All @@ -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++;
Expand Down

0 comments on commit 5c325d3

Please sign in to comment.