Avoid copy of std::function-based callback in path unpacking (#6895)
* Avoid copy of std::function-based callback in path unpacking * Fix formatting * Update CHANGELOG.md
This commit is contained in:
parent
ed5003b502
commit
51b74a99aa
@ -20,6 +20,7 @@
|
||||
- NodeJS:
|
||||
- CHANGED: Use node-api instead of NAN. [#6452](https://github.com/Project-OSRM/osrm-backend/pull/6452)
|
||||
- Misc:
|
||||
- CHANGED: Avoid copy of std::function-based callback in path unpacking [#6895](https://github.com/Project-OSRM/osrm-backend/pull/6895)
|
||||
- CHANGED: Replace boost::hash by std::hash [#6892](https://github.com/Project-OSRM/osrm-backend/pull/6892)
|
||||
- CHANGED: Partial fix migration from boost::optional to std::optional [#6551](https://github.com/Project-OSRM/osrm-backend/issues/6551)
|
||||
- CHANGED: Update Conan Boost version to 1.85.0. [#6868](https://github.com/Project-OSRM/osrm-backend/pull/6868)
|
||||
|
@ -55,7 +55,7 @@ template <> class AlgorithmDataFacade<CH>
|
||||
|
||||
virtual EdgeID FindSmallestEdge(const NodeID edge_based_node_from,
|
||||
const NodeID edge_based_node_to,
|
||||
const std::function<bool(EdgeData)> filter) const = 0;
|
||||
const std::function<bool(const EdgeData &)> &filter) const = 0;
|
||||
};
|
||||
|
||||
template <> class AlgorithmDataFacade<MLD>
|
||||
|
@ -130,9 +130,10 @@ class ContiguousInternalMemoryAlgorithmDataFacade<CH> : public datafacade::Algor
|
||||
edge_based_node_from, edge_based_node_to, result);
|
||||
}
|
||||
|
||||
EdgeID FindSmallestEdge(const NodeID edge_based_node_from,
|
||||
const NodeID edge_based_node_to,
|
||||
std::function<bool(EdgeData)> filter) const override final
|
||||
EdgeID
|
||||
FindSmallestEdge(const NodeID edge_based_node_from,
|
||||
const NodeID edge_based_node_to,
|
||||
const std::function<bool(const EdgeData &)> &filter) const override final
|
||||
{
|
||||
return m_query_graph.FindSmallestEdge(edge_based_node_from, edge_based_node_to, filter);
|
||||
}
|
||||
|
@ -238,9 +238,10 @@ class MockAlgorithmDataFacade<engine::datafacade::CH>
|
||||
return SPECIAL_EDGEID;
|
||||
}
|
||||
|
||||
EdgeID FindSmallestEdge(const NodeID /* from */,
|
||||
const NodeID /* to */,
|
||||
std::function<bool(EdgeData)> /* filter */) const override
|
||||
EdgeID
|
||||
FindSmallestEdge(const NodeID /* from */,
|
||||
const NodeID /* to */,
|
||||
const std::function<bool(const EdgeData &)> & /* filter */) const override
|
||||
{
|
||||
return SPECIAL_EDGEID;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user