diff --git a/include/engine/routing_algorithms/routing_base.hpp b/include/engine/routing_algorithms/routing_base.hpp index 5dad4b458..e6891e99e 100644 --- a/include/engine/routing_algorithms/routing_base.hpp +++ b/include/engine/routing_algorithms/routing_base.hpp @@ -158,7 +158,7 @@ void annotatePath(const FacadeT &facade, extractor::guidance::TurnInstruction::NO_TURN(), {{0, INVALID_LANEID}, INVALID_LANE_DESCRIPTIONID}, travel_mode, - {}, + EMPTY_ENTRY_CLASS, datasource_vector[segment_idx], util::guidance::TurnBearing(0), util::guidance::TurnBearing(0)}); @@ -233,7 +233,7 @@ void annotatePath(const FacadeT &facade, extractor::guidance::TurnInstruction::NO_TURN(), {{0, INVALID_LANEID}, INVALID_LANE_DESCRIPTIONID}, facade.GetTravelMode(target_node_id), - {}, + EMPTY_ENTRY_CLASS, datasource_vector[segment_idx], util::guidance::TurnBearing(0), util::guidance::TurnBearing(0)}); diff --git a/include/util/guidance/entry_class.hpp b/include/util/guidance/entry_class.hpp index 931de35dc..f2be2d0fc 100644 --- a/include/util/guidance/entry_class.hpp +++ b/include/util/guidance/entry_class.hpp @@ -39,7 +39,7 @@ class EntryClass using FlagBaseType = std::uint32_t; public: - EntryClass(); + constexpr EntryClass() : enabled_entries_flags(0) {} // we are hiding the access to the flags behind a protection wall, to make sure the bit logic // isn't tempered with. zero based indexing @@ -72,6 +72,8 @@ static_assert(std::is_trivially_copyable::value, } // namespace guidance } // namespace utilr + +constexpr const util::guidance::EntryClass EMPTY_ENTRY_CLASS{}; } // namespace osrm // make Entry Class hasbable diff --git a/src/util/guidance/entry_class.cpp b/src/util/guidance/entry_class.cpp index 9140eb020..298b2867c 100644 --- a/src/util/guidance/entry_class.cpp +++ b/src/util/guidance/entry_class.cpp @@ -9,8 +9,6 @@ namespace util namespace guidance { -EntryClass::EntryClass() : enabled_entries_flags(0) {} - void EntryClass::activate(std::uint32_t index) { BOOST_ASSERT(index < 8 * sizeof(FlagBaseType));