Make EMPTY_ENTRY_CLASS constexpr
This commit is contained in:
parent
22479ff5d8
commit
dd8f5ac01d
@ -158,7 +158,7 @@ void annotatePath(const FacadeT &facade,
|
|||||||
extractor::guidance::TurnInstruction::NO_TURN(),
|
extractor::guidance::TurnInstruction::NO_TURN(),
|
||||||
{{0, INVALID_LANEID}, INVALID_LANE_DESCRIPTIONID},
|
{{0, INVALID_LANEID}, INVALID_LANE_DESCRIPTIONID},
|
||||||
travel_mode,
|
travel_mode,
|
||||||
{},
|
EMPTY_ENTRY_CLASS,
|
||||||
datasource_vector[segment_idx],
|
datasource_vector[segment_idx],
|
||||||
util::guidance::TurnBearing(0),
|
util::guidance::TurnBearing(0),
|
||||||
util::guidance::TurnBearing(0)});
|
util::guidance::TurnBearing(0)});
|
||||||
@ -233,7 +233,7 @@ void annotatePath(const FacadeT &facade,
|
|||||||
extractor::guidance::TurnInstruction::NO_TURN(),
|
extractor::guidance::TurnInstruction::NO_TURN(),
|
||||||
{{0, INVALID_LANEID}, INVALID_LANE_DESCRIPTIONID},
|
{{0, INVALID_LANEID}, INVALID_LANE_DESCRIPTIONID},
|
||||||
facade.GetTravelMode(target_node_id),
|
facade.GetTravelMode(target_node_id),
|
||||||
{},
|
EMPTY_ENTRY_CLASS,
|
||||||
datasource_vector[segment_idx],
|
datasource_vector[segment_idx],
|
||||||
util::guidance::TurnBearing(0),
|
util::guidance::TurnBearing(0),
|
||||||
util::guidance::TurnBearing(0)});
|
util::guidance::TurnBearing(0)});
|
||||||
|
@ -39,7 +39,7 @@ class EntryClass
|
|||||||
using FlagBaseType = std::uint32_t;
|
using FlagBaseType = std::uint32_t;
|
||||||
|
|
||||||
public:
|
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
|
// 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
|
// isn't tempered with. zero based indexing
|
||||||
@ -72,6 +72,8 @@ static_assert(std::is_trivially_copyable<EntryClass>::value,
|
|||||||
|
|
||||||
} // namespace guidance
|
} // namespace guidance
|
||||||
} // namespace utilr
|
} // namespace utilr
|
||||||
|
|
||||||
|
constexpr const util::guidance::EntryClass EMPTY_ENTRY_CLASS{};
|
||||||
} // namespace osrm
|
} // namespace osrm
|
||||||
|
|
||||||
// make Entry Class hasbable
|
// make Entry Class hasbable
|
||||||
|
@ -9,8 +9,6 @@ namespace util
|
|||||||
namespace guidance
|
namespace guidance
|
||||||
{
|
{
|
||||||
|
|
||||||
EntryClass::EntryClass() : enabled_entries_flags(0) {}
|
|
||||||
|
|
||||||
void EntryClass::activate(std::uint32_t index)
|
void EntryClass::activate(std::uint32_t index)
|
||||||
{
|
{
|
||||||
BOOST_ASSERT(index < 8 * sizeof(FlagBaseType));
|
BOOST_ASSERT(index < 8 * sizeof(FlagBaseType));
|
||||||
|
Loading…
Reference in New Issue
Block a user