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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user