Upgrade formatting to clang-format 10 (#5895)
* Update formatting tools to clang-format-10 * Reformat using clang-format-10.0.09
This commit is contained in:
@@ -48,18 +48,16 @@ template <typename Key, typename Value> struct CSVFilesParser
|
||||
{
|
||||
tbb::spin_mutex mutex;
|
||||
std::vector<std::pair<Key, Value>> lookup;
|
||||
tbb::parallel_for(std::size_t{0},
|
||||
csv_filenames.size(),
|
||||
[&](const std::size_t idx) {
|
||||
auto local = ParseCSVFile(csv_filenames[idx], start_index + idx);
|
||||
tbb::parallel_for(std::size_t{0}, csv_filenames.size(), [&](const std::size_t idx) {
|
||||
auto local = ParseCSVFile(csv_filenames[idx], start_index + idx);
|
||||
|
||||
{ // Merge local CSV results into a flat global vector
|
||||
tbb::spin_mutex::scoped_lock _{mutex};
|
||||
lookup.insert(end(lookup),
|
||||
std::make_move_iterator(begin(local)),
|
||||
std::make_move_iterator(end(local)));
|
||||
}
|
||||
});
|
||||
{ // Merge local CSV results into a flat global vector
|
||||
tbb::spin_mutex::scoped_lock _{mutex};
|
||||
lookup.insert(end(lookup),
|
||||
std::make_move_iterator(begin(local)),
|
||||
std::make_move_iterator(end(local)));
|
||||
}
|
||||
});
|
||||
|
||||
// With flattened map-ish view of all the files, make a stable sort on key and source
|
||||
// and unique them on key to keep only the value with the largest file index
|
||||
@@ -140,7 +138,7 @@ template <typename Key, typename Value> struct CSVFilesParser
|
||||
const KeyRule key_rule;
|
||||
const ValueRule value_rule;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace updater
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@@ -11,8 +11,8 @@ namespace csv
|
||||
{
|
||||
SegmentLookupTable readSegmentValues(const std::vector<std::string> &paths);
|
||||
TurnLookupTable readTurnValues(const std::vector<std::string> &paths);
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace csv
|
||||
} // namespace updater
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@@ -88,7 +88,7 @@ struct PenaltySource final
|
||||
|
||||
using SegmentLookupTable = LookupTable<Segment, SpeedSource>;
|
||||
using TurnLookupTable = LookupTable<Turn, PenaltySource>;
|
||||
}
|
||||
}
|
||||
} // namespace updater
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@@ -37,7 +37,7 @@ class Updater
|
||||
private:
|
||||
UpdaterConfig config;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace updater
|
||||
} // namespace osrm
|
||||
|
||||
#endif
|
||||
|
||||
@@ -73,7 +73,7 @@ struct UpdaterConfig final : storage::IOConfig
|
||||
std::vector<std::string> turn_penalty_lookup_paths;
|
||||
std::string tz_file_path;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace updater
|
||||
} // namespace osrm
|
||||
|
||||
#endif // EXTRACTOR_OPTIONS_HPP
|
||||
|
||||
Reference in New Issue
Block a user