Use std::ranges::subrange instead of boost::iterator_range
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <algorithm>
|
||||
#include <cctype>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
namespace osrm::extractor
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@ template <typename RestrictionFilter> class NodeRestrictionMap
|
||||
// Find all restrictions applicable to (from,via,*) turns
|
||||
auto Restrictions(NodeID from, NodeID via) const
|
||||
{
|
||||
return getRange(from, via) | boost::adaptors::filtered(index_filter);
|
||||
return getRange(from, via) | std::views::filter(index_filter);
|
||||
};
|
||||
|
||||
// Find all restrictions applicable to (from,via,to) turns
|
||||
@@ -34,7 +34,7 @@ template <typename RestrictionFilter> class NodeRestrictionMap
|
||||
{
|
||||
const auto turnFilter = [this, to](const auto &restriction)
|
||||
{ return index_filter(restriction) && restriction->IsTurnRestricted(to); };
|
||||
return getRange(from, via) | boost::adaptors::filtered(turnFilter);
|
||||
return getRange(from, via) | std::views::filter(turnFilter);
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "util/node_based_graph.hpp"
|
||||
#include "util/std_hash.hpp"
|
||||
#include "util/typedefs.hpp"
|
||||
|
||||
#include <ranges>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace osrm::extractor
|
||||
@@ -102,9 +102,9 @@ struct RestrictionGraph
|
||||
friend restriction_graph_details::transferBuilder;
|
||||
friend RestrictionGraph constructRestrictionGraph(const std::vector<TurnRestriction> &);
|
||||
|
||||
using EdgeRange = boost::iterator_range<std::vector<RestrictionEdge>::const_iterator>;
|
||||
using EdgeRange = std::ranges::subrange<std::vector<RestrictionEdge>::const_iterator>;
|
||||
using RestrictionRange =
|
||||
boost::iterator_range<std::vector<const TurnRestriction *>::const_iterator>;
|
||||
std::ranges::subrange<std::vector<const TurnRestriction *>::const_iterator>;
|
||||
using EdgeKey = std::pair<NodeID, NodeID>;
|
||||
|
||||
// Helper functions for iterating over node restrictions and edges
|
||||
|
||||
Reference in New Issue
Block a user