* Sets a flag indicating that given town/industry is part of subsidised route. * @param source actual source * @param flag flag to set */
| 91 | * @param flag flag to set |
| 92 | */ |
| 93 | static inline void SetPartOfSubsidyFlag(Source source, PartOfSubsidy flag) |
| 94 | { |
| 95 | switch (source.type) { |
| 96 | case SourceType::Industry: Industry::Get(source.ToIndustryID())->part_of_subsidy.Set(flag); return; |
| 97 | case SourceType::Town: Town::Get(source.ToTownID())->cache.part_of_subsidy.Set(flag); return; |
| 98 | default: NOT_REACHED(); |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | /** Perform a full rebuild of the subsidies cache. */ |
| 103 | void RebuildSubsidisedSourceAndDestinationCache() |
no test coverage detected