Fix errors when loading an incompatible dataset.

This commit is contained in:
Patrick Niklaus
2018-03-28 23:18:09 +00:00
committed by Patrick Niklaus
parent 24e0028afb
commit 9fc2c32408
13 changed files with 40 additions and 51 deletions
-5
View File
@@ -14,7 +14,6 @@ namespace files
// reads .osrm.hsgr file
template <typename ContractedMetricT>
inline void readGraph(const boost::filesystem::path &path,
unsigned &checksum,
std::unordered_map<std::string, ContractedMetricT> &metrics,
std::uint32_t &connectivity_checksum)
{
@@ -25,7 +24,6 @@ inline void readGraph(const boost::filesystem::path &path,
const auto fingerprint = storage::tar::FileReader::VerifyFingerprint;
storage::tar::FileReader reader{path, fingerprint};
reader.ReadInto("/ch/checksum", checksum);
reader.ReadInto("/ch/connectivity_checksum", connectivity_checksum);
for (auto &pair : metrics)
@@ -38,7 +36,6 @@ inline void readGraph(const boost::filesystem::path &path,
// writes .osrm.hsgr file
template <typename ContractedMetricT>
inline void writeGraph(const boost::filesystem::path &path,
unsigned checksum,
const std::unordered_map<std::string, ContractedMetricT> &metrics,
const std::uint32_t connectivity_checksum)
{
@@ -48,8 +45,6 @@ inline void writeGraph(const boost::filesystem::path &path,
const auto fingerprint = storage::tar::FileWriter::GenerateFingerprint;
storage::tar::FileWriter writer{path, fingerprint};
writer.WriteElementCount64("/ch/checksum", 1);
writer.WriteFrom("/ch/checksum", checksum);
writer.WriteElementCount64("/ch/connectivity_checksum", 1);
writer.WriteFrom("/ch/connectivity_checksum", connectivity_checksum);