Codechange: Make SpriteType, CargoSortType, SourceType and ScriptType enum classes. (#10663)

This avoids a (soft) namespace conflict between the four ST_* enums.
This commit is contained in:
PeterN
2023-04-16 20:00:55 +01:00
committed by GitHub
parent 32c8e7feb8
commit e97bf271dc
42 changed files with 189 additions and 189 deletions

View File

@@ -197,8 +197,8 @@ Industry::~Industry()
CloseWindowById(WC_INDUSTRY_VIEW, this->index);
DeleteNewGRFInspectWindow(GSF_INDUSTRIES, this->index);
DeleteSubsidyWith(ST_INDUSTRY, this->index);
CargoPacket::InvalidateAllFrom(ST_INDUSTRY, this->index);
DeleteSubsidyWith(SourceType::Industry, this->index);
CargoPacket::InvalidateAllFrom(SourceType::Industry, this->index);
for (Station *st : this->stations_near) {
st->RemoveIndustryToDeliver(this);
@@ -546,7 +546,7 @@ static bool TransportIndustryGoods(TileIndex tile)
i->this_month_production[j] += cw;
uint am = MoveGoodsToStation(i->produced_cargo[j], cw, ST_INDUSTRY, i->index, &i->stations_near, i->exclusive_consumer);
uint am = MoveGoodsToStation(i->produced_cargo[j], cw, SourceType::Industry, i->index, &i->stations_near, i->exclusive_consumer);
i->this_month_transported[j] += am;
moved_cargo |= (am != 0);