Skip to content

Commit

Permalink
fix compile on clang-15
Browse files Browse the repository at this point in the history
  • Loading branch information
foolnotion committed Nov 15, 2023
1 parent 12db67a commit 7a8cef1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions source/operators/non_dominated_sorter/merge_sort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,9 @@ namespace detail {
detail::BitsetManager bsm(n);

cppsort::merge_sorter sorter;
std::vector<detail::Item> items;
items.reserve(n);
std::vector<detail::Item> items(n);
for (auto i = 0; i < n; ++i) {
items.emplace_back(i, pop[i][1]);
items[i] = { i, pop[i][1] };
}
sorter(items);

Expand Down
2 changes: 1 addition & 1 deletion source/operators/non_dominated_sorter/rank_intersect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ auto RankIntersectSorter::Sort(Operon::Span<Operon::Individual const> pop, Opero
cppsort::merge_sorter sorter;
std::vector<detail::Item> items(n);
for (auto i = 0; i < n; ++i) {
items[i] = {i, pop[i][1] };
items[i] = { i, pop[i][1] };
}
sorter(items);

Expand Down

0 comments on commit 7a8cef1

Please sign in to comment.