fix: clangformat

This commit is contained in:
Jay Zhang 2020-10-26 01:19:17 +00:00
parent c090457f1f
commit 17eb39d0a9
3 changed files with 9 additions and 6 deletions

View File

@ -402,7 +402,7 @@ inline void readTurnDurationPenalty(const boost::filesystem::path &path, TurnPen
// writes .osrm.turn_penalties_index // writes .osrm.turn_penalties_index
template <typename TurnIndexT> template <typename TurnIndexT>
inline void writeTurnPenaltiesIndex(const boost::filesystem::path &path, inline void writeTurnPenaltiesIndex(const boost::filesystem::path &path,
const TurnIndexT &turn_penalties_index) const TurnIndexT &turn_penalties_index)
{ {
const auto fingerprint = storage::tar::FileWriter::GenerateFingerprint; const auto fingerprint = storage::tar::FileWriter::GenerateFingerprint;
storage::tar::FileWriter writer{path, fingerprint}; storage::tar::FileWriter writer{path, fingerprint};
@ -412,7 +412,8 @@ inline void writeTurnPenaltiesIndex(const boost::filesystem::path &path,
// read .osrm.turn_penalties_index // read .osrm.turn_penalties_index
template <typename TurnIndexT> template <typename TurnIndexT>
inline void readTurnPenaltiesIndex(const boost::filesystem::path &path, TurnIndexT &turn_penalties_index) inline void readTurnPenaltiesIndex(const boost::filesystem::path &path,
TurnIndexT &turn_penalties_index)
{ {
const auto fingerprint = storage::tar::FileReader::VerifyFingerprint; const auto fingerprint = storage::tar::FileReader::VerifyFingerprint;
storage::tar::FileReader reader{path, fingerprint}; storage::tar::FileReader reader{path, fingerprint};

View File

@ -1130,7 +1130,8 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges(
indexed_conditionals); indexed_conditionals);
// write weight penalties per turn // write weight penalties per turn
BOOST_ASSERT(turn_weight_penalties.size() == turn_duration_penalties.size() && turn_weight_penalties.size() == turn_penalties_index.size()); BOOST_ASSERT(turn_weight_penalties.size() == turn_duration_penalties.size() &&
turn_weight_penalties.size() == turn_penalties_index.size());
files::writeTurnWeightPenalty(turn_weight_penalties_filename, turn_weight_penalties); files::writeTurnWeightPenalty(turn_weight_penalties_filename, turn_weight_penalties);
files::writeTurnDurationPenalty(turn_duration_penalties_filename, turn_duration_penalties); files::writeTurnDurationPenalty(turn_duration_penalties_filename, turn_duration_penalties);
files::writeTurnPenaltiesIndex(turn_penalties_index_filename, turn_penalties_index); files::writeTurnPenaltiesIndex(turn_penalties_index_filename, turn_penalties_index);

View File

@ -432,9 +432,10 @@ updateTurnPenalties(const UpdaterConfig &config,
{ {
const auto weight_multiplier = profile_properties.GetWeightMultiplier(); const auto weight_multiplier = profile_properties.GetWeightMultiplier();
// [NOTE] turn_index_blocks could be simply loaded by `files::readTurnPenaltiesIndex()`, // [NOTE] turn_index_blocks could be simply loaded by `files::readTurnPenaltiesIndex()`,
// however, we leave the below mmap to keep compatiblity. // however, we leave the below mmap to keep compatiblity.
// Use `files::readTurnPenaltiesIndex()` instead once the compatiblity is not that important. // Use `files::readTurnPenaltiesIndex()` instead once the compatiblity is not that
// important.
// Mapped file pointer for turn indices // Mapped file pointer for turn indices
boost::iostreams::mapped_file_source turn_index_region; boost::iostreams::mapped_file_source turn_index_region;
const extractor::lookup::TurnIndexBlock *turn_index_blocks; const extractor::lookup::TurnIndexBlock *turn_index_blocks;