Use GetPath with file names over accessing member variables
This commit is contained in:
committed by
Daniel J. H
parent
e208485c17
commit
d9e8caf369
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user