Skip to content

Commit

Permalink
Windows builds are broken due to MSVC fold expression bug (#416)
Browse files Browse the repository at this point in the history
* Fix Windows builds

* Run clang-format

* Run clang-format-16
  • Loading branch information
nolankramer committed Apr 22, 2024
1 parent 6c8f96d commit 11e80f2
Show file tree
Hide file tree
Showing 10 changed files with 636 additions and 430 deletions.
16 changes: 8 additions & 8 deletions include/CXXGraph/Graph/Algorithm/Boruvka_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,16 +187,16 @@ const MstResult Graph<T>::boruvka_deterministic() const {
// Else check if current edge is closer to previous
// cheapest edges of set1 and set2
if (cheapest[set1] == INT_MAX ||
(edgeWeight[cheapest[set1]] > edgeWeight[edgeId]) ||
(edgeWeight[cheapest[set1]] == edgeWeight[edgeId] && cheapest[set1] > edgeId)
)
cheapest[set1] = edgeId;
(edgeWeight[cheapest[set1]] > edgeWeight[edgeId]) ||
(edgeWeight[cheapest[set1]] == edgeWeight[edgeId] &&
cheapest[set1] > edgeId))
cheapest[set1] = edgeId;

if (cheapest[set2] == INT_MAX ||
(edgeWeight[cheapest[set2]] > edgeWeight[edgeId]) ||
(edgeWeight[cheapest[set2]] == edgeWeight[edgeId] && cheapest[set2] > edgeId)
)
cheapest[set2] = edgeId;
(edgeWeight[cheapest[set2]] > edgeWeight[edgeId]) ||
(edgeWeight[cheapest[set2]] == edgeWeight[edgeId] &&
cheapest[set2] > edgeId))
cheapest[set2] = edgeId;
}

// iterate over all the vertices and add picked
Expand Down
Loading

0 comments on commit 11e80f2

Please sign in to comment.