Replace boost::optional with std::optional (#6611)
This commit is contained in:
@@ -15,11 +15,10 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <optional>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
namespace osrm::guidance
|
||||
{
|
||||
|
||||
@@ -129,7 +128,7 @@ class IntersectionHandler
|
||||
// ^ via
|
||||
//
|
||||
// For this scenario returns intersection at `b` and `b`.
|
||||
boost::optional<IntersectionHandler::IntersectionViewAndNode>
|
||||
std::optional<IntersectionHandler::IntersectionViewAndNode>
|
||||
getNextIntersection(const NodeID at, const EdgeID via) const;
|
||||
|
||||
bool isSameName(const EdgeID source_edge_id, const EdgeID target_edge_id) const;
|
||||
|
||||
@@ -9,10 +9,9 @@
|
||||
|
||||
#include "util/node_based_graph.hpp"
|
||||
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
namespace osrm::guidance
|
||||
{
|
||||
|
||||
@@ -43,9 +42,9 @@ class SliproadHandler final : public IntersectionHandler
|
||||
Intersection intersection) const override final;
|
||||
|
||||
private:
|
||||
boost::optional<std::size_t> getObviousIndexWithSliproads(const EdgeID from,
|
||||
const Intersection &intersection,
|
||||
const NodeID at) const;
|
||||
std::optional<std::size_t> getObviousIndexWithSliproads(const EdgeID from,
|
||||
const Intersection &intersection,
|
||||
const NodeID at) const;
|
||||
|
||||
// Next intersection from `start` onto `onto` is too far away for a Siproad scenario
|
||||
bool nextIntersectionIsTooFarAway(const NodeID start, const EdgeID onto) const;
|
||||
|
||||
@@ -11,9 +11,8 @@
|
||||
#include "util/attributes.hpp"
|
||||
#include "util/node_based_graph.hpp"
|
||||
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
#include <cstddef>
|
||||
#include <optional>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
@@ -72,7 +71,7 @@ class TurnHandler final : public IntersectionHandler
|
||||
|
||||
bool hasObvious(const EdgeID &via_edge, const Fork &fork) const;
|
||||
|
||||
boost::optional<Fork> findForkCandidatesByGeometry(Intersection &intersection) const;
|
||||
std::optional<Fork> findForkCandidatesByGeometry(Intersection &intersection) const;
|
||||
|
||||
bool isCompatibleByRoadClass(const Intersection &intersection, const Fork fork) const;
|
||||
|
||||
@@ -96,7 +95,7 @@ class TurnHandler final : public IntersectionHandler
|
||||
handleDistinctConflict(const EdgeID via_edge, ConnectedRoad &left, ConnectedRoad &right) const;
|
||||
|
||||
// Classification
|
||||
boost::optional<Fork> findFork(const EdgeID via_edge, Intersection &intersection) const;
|
||||
std::optional<Fork> findFork(const EdgeID via_edge, Intersection &intersection) const;
|
||||
|
||||
OSRM_ATTR_WARN_UNUSED
|
||||
Intersection assignLeftTurns(const EdgeID via_edge,
|
||||
|
||||
Reference in New Issue
Block a user