Skip to content

Commit

Permalink
Get size of WeeklyProfitHistory in compile time
Browse files Browse the repository at this point in the history
  • Loading branch information
Broxzier committed Jan 25, 2024
1 parent 99e1746 commit 9b8473e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/openrct2/world/Park.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,8 @@ void Park::UpdateHistories()
{
currentWeeklyProfit /= gameState.WeeklyProfitAverageDivisor;
}
HistoryPushRecord<money64, FINANCE_GRAPH_SIZE>(gameState.WeeklyProfitHistory, currentWeeklyProfit);
HistoryPushRecord<money64, std::extent_v<decltype(GameState_t::WeeklyProfitHistory)>>(
gameState.WeeklyProfitHistory, currentWeeklyProfit);
gameState.WeeklyProfitAverageDividend = 0;
gameState.WeeklyProfitAverageDivisor = 0;

Expand Down

0 comments on commit 9b8473e

Please sign in to comment.