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:
		@@ -8,9 +8,9 @@
 | 
			
		||||
; company changes them, it changes for all players.
 | 
			
		||||
 | 
			
		||||
[pre-amble]
 | 
			
		||||
static void UpdateAllServiceInterval(int32 new_value);
 | 
			
		||||
static bool CanUpdateServiceInterval(VehicleType type, int32 &new_value);
 | 
			
		||||
static void UpdateServiceInterval(VehicleType type, int32 new_value);
 | 
			
		||||
static void UpdateAllServiceInterval(int32_t new_value);
 | 
			
		||||
static bool CanUpdateServiceInterval(VehicleType type, int32_t &new_value);
 | 
			
		||||
static void UpdateServiceInterval(VehicleType type, int32_t new_value);
 | 
			
		||||
 | 
			
		||||
static const SettingVariant _company_settings_table[] = {
 | 
			
		||||
[post-amble]
 | 
			
		||||
 
 | 
			
		||||
@@ -10,11 +10,11 @@
 | 
			
		||||
[pre-amble]
 | 
			
		||||
const std::array<std::string, GAME_DIFFICULTY_NUM> _old_diff_settings{"max_no_competitors", "competitor_start_time", "number_towns", "industry_density", "max_loan", "initial_interest", "vehicle_costs", "competitor_speed", "competitor_intelligence", "vehicle_breakdowns", "subsidy_multiplier", "construction_cost", "terrain_type", "quantity_sea_lakes", "economy", "line_reverse_mode", "disasters", "town_council_tolerance"};
 | 
			
		||||
 | 
			
		||||
uint16 _old_diff_custom[GAME_DIFFICULTY_NUM];
 | 
			
		||||
uint8 _old_diff_level;                                 ///< Old difficulty level from old savegames
 | 
			
		||||
uint16_t _old_diff_custom[GAME_DIFFICULTY_NUM];
 | 
			
		||||
uint8_t _old_diff_level;                                 ///< Old difficulty level from old savegames
 | 
			
		||||
 | 
			
		||||
static void DifficultyNoiseChange(int32 new_value);
 | 
			
		||||
static void MaxNoAIsChange(int32 new_value);
 | 
			
		||||
static void DifficultyNoiseChange(int32_t new_value);
 | 
			
		||||
static void MaxNoAIsChange(int32_t new_value);
 | 
			
		||||
 | 
			
		||||
static const SettingVariant _difficulty_settings_table[] = {
 | 
			
		||||
[post-amble]
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
; and in the savegame PATS chunk.
 | 
			
		||||
 | 
			
		||||
[pre-amble]
 | 
			
		||||
static void TownFoundingChanged(int32 new_value);
 | 
			
		||||
static void TownFoundingChanged(int32_t new_value);
 | 
			
		||||
 | 
			
		||||
static const SettingVariant _economy_settings_table[] = {
 | 
			
		||||
[post-amble]
 | 
			
		||||
 
 | 
			
		||||
@@ -11,16 +11,16 @@
 | 
			
		||||
[pre-amble]
 | 
			
		||||
static constexpr std::initializer_list<const char*> _roadsides{"left", "right"};
 | 
			
		||||
 | 
			
		||||
static void StationSpreadChanged(int32 new_value);
 | 
			
		||||
static void UpdateConsists(int32 new_value);
 | 
			
		||||
static void TrainAccelerationModelChanged(int32 new_value);
 | 
			
		||||
static void RoadVehAccelerationModelChanged(int32 new_value);
 | 
			
		||||
static void TrainSlopeSteepnessChanged(int32 new_value);
 | 
			
		||||
static void RoadVehSlopeSteepnessChanged(int32 new_value);
 | 
			
		||||
static bool CheckRoadSide(int32 &new_value);
 | 
			
		||||
static bool CheckDynamicEngines(int32 &new_value);
 | 
			
		||||
static void StationCatchmentChanged(int32 new_value);
 | 
			
		||||
static void MaxVehiclesChanged(int32 new_value);
 | 
			
		||||
static void StationSpreadChanged(int32_t new_value);
 | 
			
		||||
static void UpdateConsists(int32_t new_value);
 | 
			
		||||
static void TrainAccelerationModelChanged(int32_t new_value);
 | 
			
		||||
static void RoadVehAccelerationModelChanged(int32_t new_value);
 | 
			
		||||
static void TrainSlopeSteepnessChanged(int32_t new_value);
 | 
			
		||||
static void RoadVehSlopeSteepnessChanged(int32_t new_value);
 | 
			
		||||
static bool CheckRoadSide(int32_t &new_value);
 | 
			
		||||
static bool CheckDynamicEngines(int32_t &new_value);
 | 
			
		||||
static void StationCatchmentChanged(int32_t new_value);
 | 
			
		||||
static void MaxVehiclesChanged(int32_t new_value);
 | 
			
		||||
 | 
			
		||||
static const SettingVariant _game_settings_table[] = {
 | 
			
		||||
[post-amble]
 | 
			
		||||
 
 | 
			
		||||
@@ -7,14 +7,14 @@
 | 
			
		||||
; GUI settings as stored in the main configuration file ("openttd.cfg").
 | 
			
		||||
 | 
			
		||||
[pre-amble]
 | 
			
		||||
static void v_PositionMainToolbar(int32 new_value);
 | 
			
		||||
static void v_PositionStatusbar(int32 new_value);
 | 
			
		||||
static void RedrawSmallmap(int32 new_value);
 | 
			
		||||
static void UpdateLinkgraphColours(int32 new_value);
 | 
			
		||||
static void InvalidateCompanyLiveryWindow(int32 new_value);
 | 
			
		||||
static void InvalidateNewGRFChangeWindows(int32 new_value);
 | 
			
		||||
static void ZoomMinMaxChanged(int32 new_value);
 | 
			
		||||
static void SpriteZoomMinChanged(int32 new_value);
 | 
			
		||||
static void v_PositionMainToolbar(int32_t new_value);
 | 
			
		||||
static void v_PositionStatusbar(int32_t new_value);
 | 
			
		||||
static void RedrawSmallmap(int32_t new_value);
 | 
			
		||||
static void UpdateLinkgraphColours(int32_t new_value);
 | 
			
		||||
static void InvalidateCompanyLiveryWindow(int32_t new_value);
 | 
			
		||||
static void InvalidateNewGRFChangeWindows(int32_t new_value);
 | 
			
		||||
static void ZoomMinMaxChanged(int32_t new_value);
 | 
			
		||||
static void SpriteZoomMinChanged(int32_t new_value);
 | 
			
		||||
 | 
			
		||||
static constexpr std::initializer_list<const char*> _osk_activation{"disabled", "double", "single", "immediately"};
 | 
			
		||||
static constexpr std::initializer_list<const char*> _savegame_date{"long", "short", "iso"};
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
; in the savegame PATS chunk. These settings are not sync'd over the network.
 | 
			
		||||
 | 
			
		||||
[pre-amble]
 | 
			
		||||
uint8 _old_units;                                      ///< Old units from old savegames
 | 
			
		||||
uint8_t _old_units;                                      ///< Old units from old savegames
 | 
			
		||||
 | 
			
		||||
static constexpr std::initializer_list<const char*> _locale_currencies{"GBP", "USD", "EUR", "JPY", "ATS", "BEF", "CHF", "CZK", "DEM", "DKK", "ESP", "FIM", "FRF", "GRD", "HUF", "ISK", "ITL", "NLG", "NOK", "PLN", "RON", "RUR", "SIT", "SEK", "TRY", "SKK", "BRL", "EEK", "LTL", "KRW", "ZAR", "custom", "GEL", "IRR", "RUB", "MXN", "NTD", "CNY", "HKD", "INR", "IDR", "MYR"};
 | 
			
		||||
static constexpr std::initializer_list<const char*> _locale_units{"imperial", "metric", "si", "gameunits"};
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
; and in the savegame PATS chunk.
 | 
			
		||||
 | 
			
		||||
[pre-amble]
 | 
			
		||||
static void InvalidateShipPathCache(int32 new_value);
 | 
			
		||||
static void InvalidateShipPathCache(int32_t new_value);
 | 
			
		||||
 | 
			
		||||
static const SettingVariant _pathfinding_settings_table[] = {
 | 
			
		||||
[post-amble]
 | 
			
		||||
 
 | 
			
		||||
@@ -10,9 +10,9 @@
 | 
			
		||||
; basically construction and game_creation settings.
 | 
			
		||||
 | 
			
		||||
[pre-amble]
 | 
			
		||||
static bool CheckMaxHeightLevel(int32 &new_value);
 | 
			
		||||
static bool CheckFreeformEdges(int32 &new_value);
 | 
			
		||||
static void UpdateFreeformEdges(int32 new_value);
 | 
			
		||||
static bool CheckMaxHeightLevel(int32_t &new_value);
 | 
			
		||||
static bool CheckFreeformEdges(int32_t &new_value);
 | 
			
		||||
static void UpdateFreeformEdges(int32_t new_value);
 | 
			
		||||
 | 
			
		||||
static const SettingVariant _world_settings_table[] = {
 | 
			
		||||
[post-amble]
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user