Skip to content

Commit

Permalink
Remove static_cast of 0 to template type T in best_first_search (#288)
Browse files Browse the repository at this point in the history
Co-authored-by: sbaldu <simone.balducci@gmail.com>
  • Loading branch information
sbaldu and sbaldu committed May 12, 2023
1 parent daf32ed commit 8c72ef0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/Graph/Graph.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1631,7 +1631,7 @@ BestFirstSearchResult<T> Graph<T>::best_first_search(

std::vector<Node<T>> visited;
visited.push_back(source);
pq.push(std::make_pair(static_cast<T>(0), &source));
pq.push(std::make_pair(0.0, &source));

while (!pq.empty()) {
const Node<T> *currentNode = pq.top().second;
Expand Down

0 comments on commit 8c72ef0

Please sign in to comment.