Codechange: Using alias and std::array for company expense storage. (#11273)
This simplifies passing yearly expenses to functions and use of std algorithms.
This commit is contained in:
@@ -92,7 +92,7 @@ struct CompanyProperties {
|
||||
*/
|
||||
bool is_ai;
|
||||
|
||||
Money yearly_expenses[3][EXPENSES_END]; ///< Expenses of the company for the last three years, in every #ExpensesType category.
|
||||
std::array<Expenses, 3> yearly_expenses{}; ///< Expenses of the company for the last three years.
|
||||
CompanyEconomyEntry cur_economy; ///< Economic data of the company of this quarter.
|
||||
CompanyEconomyEntry old_economy[MAX_HISTORY_QUARTERS]; ///< Economic data of the company of the last #MAX_HISTORY_QUARTERS quarters.
|
||||
byte num_valid_stat_ent; ///< Number of valid statistical entries in #old_economy.
|
||||
|
||||
Reference in New Issue
Block a user