Codechange: automatic adding of _t to (u)int types, and WChar to char32_t

for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
This commit is contained in:
Rubidium
2023-05-08 19:01:06 +02:00
committed by rubidium42
parent 4f4810dc28
commit eaae0bb5e7
564 changed files with 4561 additions and 4561 deletions

View File

@@ -96,7 +96,7 @@ struct Industry : IndustryPool::PoolItem<&_industry_pool> {
ProducedCargoArray produced; ///< INDUSTRY_NUM_OUTPUTS production cargo slots
AcceptedCargoArray accepted; ///< INDUSTRY_NUM_INPUTS input cargo slots
byte prod_level; ///< general production level
uint16 counter; ///< used for animation and/or production (if available cargo)
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
@@ -111,13 +111,13 @@ struct Industry : IndustryPool::PoolItem<&_industry_pool> {
Owner founder; ///< Founder of the industry
TimerGameCalendar::Date construction_date; ///< Date of the construction of the industry
uint8 construction_type; ///< Way the industry was constructed (@see IndustryConstructionType)
uint8_t construction_type; ///< Way the industry was constructed (@see IndustryConstructionType)
byte 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.
uint16 random; ///< Random value used for randomisation of all kinds of things
uint16_t random; ///< Random value used for randomisation of all kinds of things
PersistentStorage *psa; ///< Persistent storage for NewGRF industries.
@@ -211,7 +211,7 @@ struct Industry : IndustryPool::PoolItem<&_industry_pool> {
* @param type IndustryType to query
* @pre type < NUM_INDUSTRYTYPES
*/
static inline uint16 GetIndustryTypeCount(IndustryType type)
static inline uint16_t GetIndustryTypeCount(IndustryType type)
{
assert(type < NUM_INDUSTRYTYPES);
return counts[type];
@@ -233,7 +233,7 @@ private:
void FillCachedName() const;
protected:
static uint16 counts[NUM_INDUSTRYTYPES]; ///< Number of industries per type ingame
static uint16_t counts[NUM_INDUSTRYTYPES]; ///< Number of industries per type ingame
};
void ClearAllIndustryCachedNames();
@@ -246,11 +246,11 @@ bool IsTileForestIndustry(TileIndex tile);
/** Data for managing the number of industries of a single industry type. */
struct IndustryTypeBuildData {
uint32 probability; ///< Relative probability of building this industry.
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).
uint16 target_count; ///< Desired number of industries of this type.
uint16 max_wait; ///< Starting number of turns to wait (copied to #wait_count).
uint16 wait_count; ///< Number of turns to wait before trying to build again.
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.
void Reset();
@@ -262,7 +262,7 @@ struct IndustryTypeBuildData {
*/
struct IndustryBuildData {
IndustryTypeBuildData builddata[NUM_INDUSTRYTYPES]; ///< Industry build data for every industry type.
uint32 wanted_inds; ///< Number of wanted industries (bits 31-16), and a fraction (bits 15-0).
uint32_t wanted_inds; ///< Number of wanted industries (bits 31-16), and a fraction (bits 15-0).
void Reset();