Use GetPath with file names over accessing member variables

This commit is contained in:
Pepijn Schoen
2017-06-16 10:45:24 +02:00
committed by Daniel J. H
parent e208485c17
commit d9e8caf369
30 changed files with 328 additions and 328 deletions
+5 -5
View File
@@ -47,7 +47,7 @@ int Contractor::Run()
util::Log() << "Reading node weights.";
std::vector<EdgeWeight> node_weights;
{
storage::io::FileReader reader(config.node_path,
storage::io::FileReader reader(config.GetPath(".osrm.enw"),
storage::io::FileReader::VerifyFingerprint);
storage::serialization::read(reader, node_weights);
}
@@ -67,7 +67,7 @@ int Contractor::Run()
std::vector<float> node_levels;
if (config.use_cached_priority)
{
files::readLevels(config.level_path, node_levels);
files::readLevels(config.GetPath(".osrm.level"), node_levels);
}
util::DeallocatingVector<QueryEdge> contracted_edge_list;
@@ -90,15 +90,15 @@ int Contractor::Run()
RangebasedCRC32 crc32_calculator;
const unsigned checksum = crc32_calculator(contracted_edge_list);
files::writeGraph(config.hsgr_data_path,
files::writeGraph(config.GetPath(".osrm.hsgr"),
checksum,
QueryGraph{max_edge_id + 1, std::move(contracted_edge_list)});
}
files::writeCoreMarker(config.core_data_path, is_core_node);
files::writeCoreMarker(config.GetPath(".osrm.core"), is_core_node);
if (!config.use_cached_priority)
{
files::writeLevels(config.level_path, node_levels);
files::writeLevels(config.GetPath(".osrm.level"), node_levels);
}
TIMER_STOP(preparing);