/
srv
/
osrm
/
osrm-backend
/
src
/
util
/
guidance
/
/srv/osrm/osrm-backend/src/util/guidance
mkdir
upload
Name
Size
Mode
Actions
bearing_class.cpp
2776
0644
edit
dl
rm
entry_class.cpp
806
0644
edit
dl
rm
turn_lanes.cpp
1006
0644
edit
dl
rm
Edit:
/srv/osrm/osrm-backend/src/util/guidance/entry_class.cpp
(806B)
#include "util/guidance/entry_class.hpp" #include <boost/assert.hpp> #include <climits> namespace osrm::util::guidance { bool EntryClass::activate(std::uint32_t index) { if (index >= CHAR_BIT * sizeof(FlagBaseType)) return false; enabled_entries_flags |= (FlagBaseType{1} << index); return true; } bool EntryClass::allowsEntry(std::uint32_t index) const { BOOST_ASSERT(index < CHAR_BIT * sizeof(FlagBaseType)); return 0 != (enabled_entries_flags & (FlagBaseType{1} << index)); } bool EntryClass::operator==(const EntryClass &other) const { return enabled_entries_flags == other.enabled_entries_flags; } bool EntryClass::operator<(const EntryClass &other) const { return enabled_entries_flags < other.enabled_entries_flags; } } // namespace osrm::util::guidance
Save
cmd:
run