Skip to content

TravelerList dicts #353

Description

@yakra

It appears we calculate & store data here, but never retrieve & use it.

# "traveled" dictionaries indexed by system name, then conn or regular
# route in another dictionary with keys route, values mileage
# "clinched" dictionaries indexed by system name, values clinch count
t.con_routes_traveled=dict()
t.con_routes_clinched=dict()
t.routes_traveled=dict()
#t.routes_clinched = dict()

std::unordered_map<HighwaySystem*, std::unordered_map<ConnectedRoute*, double>> con_routes_traveled; // mileage per ConRte per system
// TODO is this necessary?
// ConRtes by definition exist in one system only
std::unordered_map<Route*, double> routes_traveled; // mileage per traveled route
std::unordered_map<HighwaySystem*, unsignedint> con_routes_clinched; // clinch count per system
//std::unordered_map<HighwaySystem*, unsigned int> routes_clinched; // commented out in original siteupdate.py

  • Getting rid of these structures & their contents should free up some RAM, and maybe speed things up a tiny bit.

  • userlog.cpp:system_con_umap (system_con_dict in Python) can also go bye-bye.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions