Fix formatting

This commit is contained in:
Dennis 2024-05-23 10:19:40 +02:00
parent ce755adb97
commit 8412716ce4
No known key found for this signature in database
GPG Key ID: 6937EAEA33A3FA5D
5 changed files with 16 additions and 15 deletions

View File

@ -3,8 +3,8 @@
#include "extractor/class_data.hpp" #include "extractor/class_data.hpp"
#include "extractor/turn_lane_types.hpp" #include "extractor/turn_lane_types.hpp"
#include "util/typedefs.hpp"
#include "util/std_hash.hpp" #include "util/std_hash.hpp"
#include "util/typedefs.hpp"
#include <string> #include <string>
#include <unordered_map> #include <unordered_map>

View File

@ -1,8 +1,8 @@
#ifndef OSRM_EXTRACTOR_TRAFFIC_SIGNALS_HPP #ifndef OSRM_EXTRACTOR_TRAFFIC_SIGNALS_HPP
#define OSRM_EXTRACTOR_TRAFFIC_SIGNALS_HPP #define OSRM_EXTRACTOR_TRAFFIC_SIGNALS_HPP
#include "util/typedefs.hpp"
#include "util/std_hash.hpp" #include "util/std_hash.hpp"
#include "util/typedefs.hpp"
#include <unordered_set> #include <unordered_set>
#include <utility> #include <utility>

View File

@ -62,7 +62,8 @@ inline size_t hash<::osrm::util::guidance::BearingClass>::operator()(
const ::osrm::util::guidance::BearingClass &bearing_class) const const ::osrm::util::guidance::BearingClass &bearing_class) const
{ {
std::size_t value = 0; std::size_t value = 0;
hash_range(value, bearing_class.available_bearings.cbegin(), bearing_class.available_bearings.cend()); hash_range(
value, bearing_class.available_bearings.cbegin(), bearing_class.available_bearings.cend());
return value; return value;
} }
} // namespace std } // namespace std

View File

@ -17,7 +17,6 @@ class LaneTuple;
class LaneTupleIdPair; class LaneTupleIdPair;
} // namespace osrm::util::guidance } // namespace osrm::util::guidance
namespace osrm::util::guidance namespace osrm::util::guidance
{ {
@ -63,10 +62,12 @@ using LaneDataIdMap = ConcurrentIDMap<LaneTupleIdPair, LaneDataID>;
} // namespace osrm::util::guidance } // namespace osrm::util::guidance
namespace std { namespace std
{
template <> struct hash<::osrm::util::guidance::LaneTuple> template <> struct hash<::osrm::util::guidance::LaneTuple>
{ {
inline std::size_t operator()(const ::osrm::util::guidance::LaneTuple &lane_tuple) const { inline std::size_t operator()(const ::osrm::util::guidance::LaneTuple &lane_tuple) const
{
std::size_t seed{0}; std::size_t seed{0};
hash_combine(seed, lane_tuple.lanes_in_turn); hash_combine(seed, lane_tuple.lanes_in_turn);
hash_combine(seed, lane_tuple.first_lane_from_the_right); hash_combine(seed, lane_tuple.first_lane_from_the_right);
@ -77,7 +78,8 @@ namespace std {
template <> struct hash<::osrm::util::guidance::LaneTupleIdPair> template <> struct hash<::osrm::util::guidance::LaneTupleIdPair>
{ {
inline std::size_t inline std::size_t
operator()(const ::osrm::util::guidance::LaneTupleIdPair &lane_tuple_id_pair) const { operator()(const ::osrm::util::guidance::LaneTupleIdPair &lane_tuple_id_pair) const
{
std::size_t seed{0}; std::size_t seed{0};
hash_combine(seed, lane_tuple_id_pair.first); hash_combine(seed, lane_tuple_id_pair.first);
hash_combine(seed, lane_tuple_id_pair.second); hash_combine(seed, lane_tuple_id_pair.second);
@ -86,5 +88,4 @@ template <> struct hash<::osrm::util::guidance::LaneTupleIdPair>
}; };
} // namespace std } // namespace std
#endif /* OSRM_UTIL_GUIDANCE_TURN_LANES_HPP */ #endif /* OSRM_UTIL_GUIDANCE_TURN_LANES_HPP */

View File

@ -41,8 +41,7 @@ template <typename... Types> std::size_t hash_val(const Types &...args)
namespace std namespace std
{ {
template <typename ...T> template <typename... T> struct hash<std::tuple<T...>>
struct hash<std::tuple<T...>>
{ {
template <std::size_t... I> template <std::size_t... I>
static auto apply_tuple(const std::tuple<T...> &t, std::index_sequence<I...>) static auto apply_tuple(const std::tuple<T...> &t, std::index_sequence<I...>)