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:
@@ -1087,7 +1087,7 @@ static uint DeliverGoodsToIndustry(const Station *st, CargoID cargo_type, uint n
|
||||
accepted += amount;
|
||||
|
||||
/* Update the cargo monitor. */
|
||||
AddCargoDelivery(cargo_type, company, amount, ST_INDUSTRY, source, st, ind->index);
|
||||
AddCargoDelivery(cargo_type, company, amount, SourceType::Industry, source, st, ind->index);
|
||||
}
|
||||
|
||||
return accepted;
|
||||
@@ -1113,7 +1113,7 @@ static Money DeliverGoods(int num_pieces, CargoID cargo_type, StationID dest, Ti
|
||||
Station *st = Station::Get(dest);
|
||||
|
||||
/* Give the goods to the industry. */
|
||||
uint accepted_ind = DeliverGoodsToIndustry(st, cargo_type, num_pieces, src_type == ST_INDUSTRY ? src : INVALID_INDUSTRY, company->index);
|
||||
uint accepted_ind = DeliverGoodsToIndustry(st, cargo_type, num_pieces, src_type == SourceType::Industry ? src : INVALID_INDUSTRY, company->index);
|
||||
|
||||
/* If this cargo type is always accepted, accept all */
|
||||
uint accepted_total = HasBit(st->always_accepted, cargo_type) ? num_pieces : accepted_ind;
|
||||
|
Reference in New Issue
Block a user