Open yakra opened 2 years ago
Parts of regions.csv are sorted by name rather than code. Even if it were done uniformly by code, there's no guarantee it would stay that way. E.G.:
AUS-NT;Northern Territory;AUS;OCE;Territory
AUS-NSW;New South Wales;AUS;OCE;State
Instead, kill multiple birds with one stone:
Replace both Region::allregions
and Region::code_hash
with a std::map
std::map may or map not happen.
This is worthy enough of having its own issue.
Surely can't use std::sort on allregions
because regions are immovable.
BUT! Should be able to sort the parse_csv
"meta-vector". Use a lambda!
https://github.com/yakra/DataProcessing/blob/869e35c1d4c3cb729b3475619163071c3ecc8d9b/siteupdate/cplusplus/siteupdate.cpp#L565 Does this need to happen? (It does in Python because regions come from dict keys.) In C++, regions are from regions.csv and should already be sorted.