Fix 19835b51: Linker issues with static empty structs

This commit is contained in:
Jonathan G Rennison
2023-08-23 19:25:45 +01:00
parent 14dc6586bc
commit 22f9a6d7b0

View File

@@ -54,6 +54,9 @@ extern uint8 _extra_station_names_probability;
class FlowStatMap;
extern const StationCargoList _empty_cargo_list;
extern const FlowStatMap _empty_flows;
/**
* Flow statistics telling how much flow should be sent along a link. This is
* done by creating "flow shares" and using std::map's upper_bound() method to
@@ -699,13 +702,11 @@ struct GoodsEntry {
const StationCargoList &ConstCargoList() const
{
extern const StationCargoList _empty_cargo_list;
return this->data != nullptr ? this->data->cargo : _empty_cargo_list;
}
const FlowStatMap &ConstFlows() const
{
extern const FlowStatMap _empty_flows;
return this->data != nullptr ? this->data->flows : _empty_flows;
}
};