Codechange: rename byte to uint8_t (#12308)

This commit is contained in:
Patric Stout
2024-03-16 23:59:32 +01:00
committed by GitHub
parent bd7120bae4
commit a3cfd23cf9
355 changed files with 1654 additions and 1656 deletions

View File

@@ -41,7 +41,7 @@ enum ProductionLevels {
* Flags to control/override the behaviour of an industry.
* These flags are controlled by game scripts.
*/
enum IndustryControlFlags : byte {
enum IndustryControlFlags : uint8_t {
/** No flags in effect */
INDCTL_NONE = 0,
/** When industry production change is evaluated, rolls to decrease are ignored. */
@@ -98,14 +98,14 @@ struct Industry : IndustryPool::PoolItem<&_industry_pool> {
Station *neutral_station; ///< Associated neutral station
ProducedCargoArray produced; ///< INDUSTRY_NUM_OUTPUTS production cargo slots
AcceptedCargoArray accepted; ///< INDUSTRY_NUM_INPUTS input cargo slots
byte prod_level; ///< general production level
uint8_t prod_level; ///< general production level
uint16_t counter; ///< used for animation and/or production (if available cargo)
IndustryType type; ///< type of industry.
Owner owner; ///< owner of the industry. Which SHOULD always be (imho) OWNER_NONE
Colours random_colour; ///< randomized colour of the industry, for display purpose
TimerGameEconomy::Year last_prod_year; ///< last economy year of production
byte was_cargo_delivered; ///< flag that indicate this has been the closest industry chosen for cargo delivery by a station. see DeliverGoodsToIndustry
uint8_t was_cargo_delivered; ///< flag that indicate this has been the closest industry chosen for cargo delivery by a station. see DeliverGoodsToIndustry
IndustryControlFlags ctlflags; ///< flags overriding standard behaviours
PartOfSubsidy part_of_subsidy; ///< NOSAVE: is this industry a source/destination of a subsidy?
@@ -115,7 +115,7 @@ struct Industry : IndustryPool::PoolItem<&_industry_pool> {
Owner founder; ///< Founder of the industry
TimerGameCalendar::Date construction_date; ///< Date of the construction of the industry
uint8_t construction_type; ///< Way the industry was constructed (@see IndustryConstructionType)
byte selected_layout; ///< Which tile layout was used when creating the industry
uint8_t selected_layout; ///< Which tile layout was used when creating the industry
Owner exclusive_supplier; ///< Which company has exclusive rights to deliver cargo (INVALID_OWNER = anyone)
Owner exclusive_consumer; ///< Which company has exclusive rights to take cargo (INVALID_OWNER = anyone)
std::string text; ///< General text with additional information.
@@ -275,7 +275,7 @@ bool IsTileForestIndustry(TileIndex tile);
/** Data for managing the number of industries of a single industry type. */
struct IndustryTypeBuildData {
uint32_t probability; ///< Relative probability of building this industry.
byte min_number; ///< Smallest number of industries that should exist (either \c 0 or \c 1).
uint8_t min_number; ///< Smallest number of industries that should exist (either \c 0 or \c 1).
uint16_t target_count; ///< Desired number of industries of this type.
uint16_t max_wait; ///< Starting number of turns to wait (copied to #wait_count).
uint16_t wait_count; ///< Number of turns to wait before trying to build again.