Skip to content

Commit

Permalink
Revert "Revert "Fix compile error in __serial_merge (#2013)""
Browse files Browse the repository at this point in the history
This reverts commit 9fdbe52.
  • Loading branch information
SergeyKopienko committed Jan 27, 2025
1 parent 9fdbe52 commit bc77e7c
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,11 @@ __serial_merge(const _Rng1& __rng1, const _Rng2& __rng2, _Rng3& __rng3, const _I
// One of __rng1_idx_less_n1 and __rng2_idx_less_n2 should be true here
// because 1) we should fill output data with elements from one of the input ranges
// 2) we calculate __rng3_idx_end as std::min<_Index>(__rng1_size + __rng2_size, __chunk).
__rng3[__rng3_idx] =
((__rng1_idx_less_n1 && __rng2_idx_less_n2 && __comp(__rng2[__rng2_idx], __rng1[__rng1_idx])) ||
!__rng1_idx_less_n1)
? __rng2[__rng2_idx++]
: __rng1[__rng1_idx++];
if (__rng1_idx_less_n1 && __rng2_idx_less_n2 && __comp(__rng2[__rng2_idx], __rng1[__rng1_idx]) ||
!__rng1_idx_less_n1)
__rng3[__rng3_idx] = __rng2[__rng2_idx++];
else
__rng3[__rng3_idx] = __rng1[__rng1_idx++];
}
}

Expand Down

0 comments on commit bc77e7c

Please sign in to comment.