Codechange: replace magic numbers and C-style arrays with C++-style array for share owners

This commit is contained in:
Rubidium
2022-02-02 22:34:22 +01:00
committed by rubidium42
parent 2bfceea762
commit c73f578e8c
7 changed files with 54 additions and 67 deletions

View File

@@ -17,6 +17,7 @@
#include "settings_type.h"
#include "group.h"
#include <string>
#include <array>
/** Statistics about the economy. */
struct CompanyEconomyEntry {
@@ -74,7 +75,7 @@ struct CompanyProperties {
TileIndex location_of_HQ; ///< Northern tile of HQ; #INVALID_TILE when there is none.
TileIndex last_build_coordinate; ///< Coordinate of the last build thing by this company.
Owner share_owners[4]; ///< Owners of the 4 shares of the company. #INVALID_OWNER if nobody has bought them yet.
std::array<Owner, MAX_COMPANY_SHARE_OWNERS> share_owners; ///< Owners of the shares of the company. #INVALID_OWNER if nobody has bought them yet.
Year inaugurated_year; ///< Year of starting the company.