Adding of _t to (u)int types, and WChar to char32_t

See: eaae0bb5e
This commit is contained in:
Jonathan G Rennison
2024-01-07 16:41:53 +00:00
parent 55d78a23be
commit 97e6f3062e
655 changed files with 7555 additions and 7555 deletions

View File

@@ -635,22 +635,22 @@ void FixupTrainLengths()
}
}
static uint8 _cargo_periods;
static uint16 _cargo_source;
static uint32 _cargo_source_xy;
static uint16 _cargo_count;
static uint16 _cargo_paid_for;
static uint8_t _cargo_periods;
static uint16_t _cargo_source;
static uint32_t _cargo_source_xy;
static uint16_t _cargo_count;
static uint16_t _cargo_paid_for;
static Money _cargo_feeder_share;
CargoPacketList _cpp_packets;
std::map<VehicleID, CargoPacketList> _veh_cpp_packets;
static std::vector<Trackdir> _path_td;
static std::vector<TileIndex> _path_tile;
static uint32 _path_layout_ctr;
static uint32_t _path_layout_ctr;
static uint32 _old_ahead_separation;
static uint16 _old_timetable_start_subticks;
static uint32_t _old_ahead_separation;
static uint16_t _old_timetable_start_subticks;
btree::btree_map<VehicleID, uint16> _old_timetable_start_subticks_map;
btree::btree_map<VehicleID, uint16_t> _old_timetable_start_subticks_map;
/**
* Make it possible to make the saveload tables "friends" of other classes.
@@ -715,10 +715,10 @@ SaveLoadTable GetVehicleDescription(VehicleType vt)
SLE_VAR(Vehicle, day_counter, SLE_UINT8),
SLE_VAR(Vehicle, tick_counter, SLE_UINT8),
SLE_CONDVAR_X(Vehicle, running_ticks, SLE_FILE_U8 | SLE_VAR_U16, SLV_88, SL_MAX_VERSION, SlXvFeatureTest([](uint16 version, bool version_in_range, const std::array<uint16, XSLFI_SIZE> &feature_versions) -> bool {
SLE_CONDVAR_X(Vehicle, running_ticks, SLE_FILE_U8 | SLE_VAR_U16, SLV_88, SL_MAX_VERSION, SlXvFeatureTest([](uint16_t version, bool version_in_range, const std::array<uint16_t, XSLFI_SIZE> &feature_versions) -> bool {
return version_in_range && !(SlXvIsFeaturePresent(feature_versions, XSLFI_SPRINGPP, 3) || SlXvIsFeaturePresent(feature_versions, XSLFI_JOKERPP) || SlXvIsFeaturePresent(feature_versions, XSLFI_CHILLPP) || SlXvIsFeaturePresent(feature_versions, XSLFI_VARIABLE_DAY_LENGTH, 2));
})),
SLE_CONDVAR_X(Vehicle, running_ticks, SLE_UINT16, SLV_88, SL_MAX_VERSION, SlXvFeatureTest([](uint16 version, bool version_in_range, const std::array<uint16, XSLFI_SIZE> &feature_versions) -> bool {
SLE_CONDVAR_X(Vehicle, running_ticks, SLE_UINT16, SLV_88, SL_MAX_VERSION, SlXvFeatureTest([](uint16_t version, bool version_in_range, const std::array<uint16_t, XSLFI_SIZE> &feature_versions) -> bool {
return version_in_range && (SlXvIsFeaturePresent(feature_versions, XSLFI_SPRINGPP, 2) || SlXvIsFeaturePresent(feature_versions, XSLFI_JOKERPP) || SlXvIsFeaturePresent(feature_versions, XSLFI_CHILLPP) || SlXvIsFeaturePresent(feature_versions, XSLFI_VARIABLE_DAY_LENGTH, 2));
})),
@@ -1139,7 +1139,7 @@ void Load_VEHS()
if (vtype == VEH_ROAD && !_path_td.empty() && _path_td.size() <= RV_PATH_CACHE_SEGMENTS && _path_td.size() == _path_tile.size()) {
RoadVehicle *rv = RoadVehicle::From(v);
rv->cached_path.reset(new RoadVehPathCache());
rv->cached_path->count = (uint8)_path_td.size();
rv->cached_path->count = (uint8_t)_path_td.size();
for (size_t i = 0; i < _path_td.size(); i++) {
rv->cached_path->td[i] = _path_td[i];
rv->cached_path->tile[i] = _path_tile[i];
@@ -1148,7 +1148,7 @@ void Load_VEHS()
} else if (vtype == VEH_SHIP && !_path_td.empty() && _path_td.size() <= SHIP_PATH_CACHE_LENGTH) {
Ship *s = Ship::From(v);
s->cached_path.reset(new ShipPathCache());
s->cached_path->count = (uint8)_path_td.size();
s->cached_path->count = (uint8_t)_path_td.size();
for (size_t i = 0; i < _path_td.size(); i++) {
s->cached_path->td[i] = _path_td[i];
}
@@ -1232,13 +1232,13 @@ struct train_venc {
VehicleID id;
GroundVehicleCache gvcache;
int cached_curve_speed_mod;
uint8 cached_tflags;
uint8 cached_num_engines;
uint16 cached_centre_mass;
uint16 cached_braking_length;
uint16 cached_veh_weight;
uint16 cached_uncapped_decel;
uint8 cached_deceleration;
uint8_t cached_tflags;
uint8_t cached_num_engines;
uint16_t cached_centre_mass;
uint16_t cached_braking_length;
uint16_t cached_veh_weight;
uint16_t cached_uncapped_decel;
uint8_t cached_deceleration;
byte user_def_data;
int cached_max_curve_speed;
};
@@ -1250,7 +1250,7 @@ struct roadvehicle_venc {
struct aircraft_venc {
VehicleID id;
uint16 cached_max_range;
uint16_t cached_max_range;
};
static std::vector<vehicle_venc> _vehicle_vencs;
@@ -1485,7 +1485,7 @@ void SlProcessVENC()
}
}
static ChunkSaveLoadSpecialOpResult Special_VENC(uint32 chunk_id, ChunkSaveLoadSpecialOp op)
static ChunkSaveLoadSpecialOpResult Special_VENC(uint32_t chunk_id, ChunkSaveLoadSpecialOp op)
{
switch (op) {
case CSLSO_SHOULD_SAVE_CHUNK:
@@ -1546,11 +1546,11 @@ const SaveLoadTable GetVehicleLookAheadCurveDescription()
static void RealSave_VLKA(TrainReservationLookAhead *lookahead)
{
SlObject(lookahead, GetVehicleLookAheadDescription());
SlWriteUint32((uint32)lookahead->items.size());
SlWriteUint32((uint32_t)lookahead->items.size());
for (TrainReservationLookAheadItem &item : lookahead->items) {
SlObject(&item, GetVehicleLookAheadItemDescription());
}
SlWriteUint32((uint32)lookahead->curves.size());
SlWriteUint32((uint32_t)lookahead->curves.size());
for (TrainReservationLookAheadCurve &curve : lookahead->curves) {
SlObject(&curve, GetVehicleLookAheadCurveDescription());
}
@@ -1574,12 +1574,12 @@ void Load_VLKA()
assert(t != nullptr);
t->lookahead.reset(new TrainReservationLookAhead());
SlObject(t->lookahead.get(), GetVehicleLookAheadDescription());
uint32 items = SlReadUint32();
uint32_t items = SlReadUint32();
t->lookahead->items.resize(items);
for (uint i = 0; i < items; i++) {
SlObject(&t->lookahead->items[i], GetVehicleLookAheadItemDescription());
}
uint32 curves = SlReadUint32();
uint32_t curves = SlReadUint32();
t->lookahead->curves.resize(curves);
for (uint i = 0; i < curves; i++) {
SlObject(&t->lookahead->curves[i], GetVehicleLookAheadCurveDescription());