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
+6 -6
View File
@@ -152,9 +152,9 @@ bool Engine<routing_algorithms::ch::Algorithm>::CheckCompability(const EngineCon
}
else
{
if (!boost::filesystem::exists(config.storage_config.hsgr_data_path))
if (!boost::filesystem::exists(config.storage_config.GetPath(".osrm.hsgr")))
return false;
storage::io::FileReader in(config.storage_config.hsgr_data_path,
storage::io::FileReader in(config.storage_config.GetPath(".osrm.hsgr"),
storage::io::FileReader::VerifyFingerprint);
auto size = in.GetSize();
@@ -183,9 +183,9 @@ bool Engine<routing_algorithms::corech::Algorithm>::CheckCompability(const Engin
}
else
{
if (!boost::filesystem::exists(config.storage_config.core_data_path))
if (!boost::filesystem::exists(config.storage_config.GetPath(".osrm.core")))
return false;
storage::io::FileReader in(config.storage_config.core_data_path,
storage::io::FileReader in(config.storage_config.GetPath(".osrm.core"),
storage::io::FileReader::VerifyFingerprint);
auto size = in.GetSize();
@@ -208,9 +208,9 @@ bool Engine<routing_algorithms::mld::Algorithm>::CheckCompability(const EngineCo
}
else
{
if (!boost::filesystem::exists(config.storage_config.mld_partition_path))
if (!boost::filesystem::exists(config.storage_config.GetPath(".osrm.partition")))
return false;
storage::io::FileReader in(config.storage_config.mld_partition_path,
storage::io::FileReader in(config.storage_config.GetPath(".osrm.partition"),
storage::io::FileReader::VerifyFingerprint);
auto size = in.GetSize();