We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f9fd41e commit 1dbe275Copy full SHA for 1dbe275
source/operators/non_dominated_sorter/rank_intersect.cpp
@@ -40,11 +40,12 @@ namespace {
40
{
41
auto const n = static_cast<int>(std::ssize(pop));
42
auto const nb { static_cast<int>(n / DIGITS) + static_cast<int>(n % DIGITS != 0) };
43
- std::size_t const ub = DIGITS * nb - n;
+ ENSURE(nb > 0);
44
+ std::size_t const ub = (DIGITS * nb) - n;
45
46
std::vector<Item> items(n);
47
for (auto i = 0; i < n; ++i) {
- items[i] = { i, pop[i][1] };
48
+ items[i] = { .Index=i, .Value=pop[i][1] };
49
}
50
Sorter(items);
51
0 commit comments