Fix perfect forwarding in constructor args in util::pathfinder
This commit is contained in:
parent
752593a589
commit
929e8091dc
1 changed files with 5 additions and 4 deletions
|
|
@ -39,10 +39,11 @@ namespace psemek::util
|
|||
util::hash_map<Node, Node> previous;
|
||||
std::set<Node, node_compare> queue;
|
||||
|
||||
pathfinder(NeighboursFn && node_neighbours, HeuristicFn && heuristic, EdgeCallback && edge_callback)
|
||||
: node_neighbours(std::forward<NeighboursFn>(node_neighbours))
|
||||
, heuristic(std::forward<HeuristicFn>(heuristic))
|
||||
, edge_callback(std::forward<EdgeCallback>(edge_callback))
|
||||
template <typename NeighboursFn1, typename HeuristicFn1, typename EdgeCallback1>
|
||||
pathfinder(NeighboursFn1 && node_neighbours, HeuristicFn1 && heuristic, EdgeCallback1 && edge_callback)
|
||||
: node_neighbours(std::forward<NeighboursFn1>(node_neighbours))
|
||||
, heuristic(std::forward<HeuristicFn1>(heuristic))
|
||||
, edge_callback(std::forward<EdgeCallback1>(edge_callback))
|
||||
, queue(node_compare{priority})
|
||||
{}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue