Replace boost::optional with std::optional (#6611)
This commit is contained in:
@@ -66,7 +66,7 @@ SelectRoadByNameOnlyChoiceAndStraightness::SelectRoadByNameOnlyChoiceAndStraight
|
||||
{
|
||||
}
|
||||
|
||||
boost::optional<EdgeID> SelectRoadByNameOnlyChoiceAndStraightness::operator()(
|
||||
std::optional<EdgeID> SelectRoadByNameOnlyChoiceAndStraightness::operator()(
|
||||
const NodeID /*nid*/,
|
||||
const EdgeID /*via_edge_id*/,
|
||||
const IntersectionView &intersection,
|
||||
@@ -118,7 +118,7 @@ SelectStraightmostRoadByNameAndOnlyChoice::SelectStraightmostRoadByNameAndOnlyCh
|
||||
{
|
||||
}
|
||||
|
||||
boost::optional<EdgeID> SelectStraightmostRoadByNameAndOnlyChoice::operator()(
|
||||
std::optional<EdgeID> SelectStraightmostRoadByNameAndOnlyChoice::operator()(
|
||||
const NodeID /*nid*/,
|
||||
const EdgeID /*via_edge_id*/,
|
||||
const IntersectionView &intersection,
|
||||
@@ -241,7 +241,7 @@ boost::optional<EdgeID> SelectStraightmostRoadByNameAndOnlyChoice::operator()(
|
||||
return {};
|
||||
}
|
||||
|
||||
return is_only_choice_with_same_name ? boost::optional<EdgeID>(min_element->eid) : boost::none;
|
||||
return is_only_choice_with_same_name ? std::optional<EdgeID>(min_element->eid) : std::nullopt;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#include "extractor/maneuver_override_relation_parser.hpp"
|
||||
#include "extractor/maneuver_override.hpp"
|
||||
|
||||
#include <boost/optional/optional.hpp>
|
||||
#include <boost/ref.hpp>
|
||||
|
||||
#include <optional>
|
||||
#include <osmium/osm.hpp>
|
||||
#include <osmium/tags/filter.hpp>
|
||||
#include <osmium/tags/taglist.hpp>
|
||||
@@ -21,7 +21,7 @@ ManeuverOverrideRelationParser::ManeuverOverrideRelationParser() {}
|
||||
* into an InputManeuverOverride object, if the relation is considered
|
||||
* valid (i.e. has the minimum tags we expect).
|
||||
*/
|
||||
boost::optional<InputManeuverOverride>
|
||||
std::optional<InputManeuverOverride>
|
||||
ManeuverOverrideRelationParser::TryParse(const osmium::Relation &relation) const
|
||||
{
|
||||
|
||||
@@ -35,7 +35,7 @@ ManeuverOverrideRelationParser::TryParse(const osmium::Relation &relation) const
|
||||
if (osmium::tags::match_none_of(tag_list, filter))
|
||||
// if it's not a maneuver, continue;
|
||||
{
|
||||
return boost::none;
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
// we pretend every restriction is a conditional restriction. If we do not find any restriction,
|
||||
@@ -130,7 +130,7 @@ ManeuverOverrideRelationParser::TryParse(const osmium::Relation &relation) const
|
||||
}
|
||||
else
|
||||
{
|
||||
return boost::none;
|
||||
return std::nullopt;
|
||||
}
|
||||
return maneuver_override;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user