Closed michihdeu closed 6 months ago
Tried it out for myself and I see what you mean. :grimacing:
The solution is easy enough, just use an unordered_set
to make sure system codes are unique when reading systems.csv.
Though if I'm doing that, may as well make a static unordered_map
member of the HighwaySystem
class, similar to Region::code_hash. That will help clean up the routines that parse systemgraphs.csv, multisystem.csv & fullcustom.csv, thus tying in with #614, but I don't expect it to get much use other than that.
Similar stuff we could also do (though is it worth the bother?):
Upcoming pull request will check for duplicate system abbreviations and report those, rather than the flood of unhelpful error messages @neroute2 noted.
It will not add either of the other checks I considered above.
https://github.com/TravelMapping/RailwayData/pull/140#issue-2257045450 by @neroute2