Perform a full rebuild of the subsidies cache. */
| 101 | |
| 102 | /** Perform a full rebuild of the subsidies cache. */ |
| 103 | void RebuildSubsidisedSourceAndDestinationCache() |
| 104 | { |
| 105 | for (Town *t : Town::Iterate()) t->cache.part_of_subsidy = {}; |
| 106 | |
| 107 | for (Industry *i : Industry::Iterate()) i->part_of_subsidy = {}; |
| 108 | |
| 109 | for (const Subsidy *s : Subsidy::Iterate()) { |
| 110 | SetPartOfSubsidyFlag(s->src, PartOfSubsidy::Source); |
| 111 | SetPartOfSubsidyFlag(s->dst, PartOfSubsidy::Destination); |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | /** |
| 116 | * Delete the subsidies associated with a given cargo source type and id. |
no test coverage detected