Skip to content

Commit 6a2cff5

Browse files
committed
shift-to-unsigned
1 parent d9bd2e9 commit 6a2cff5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libcxx/include/__algorithm/radix_sort.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,10 +295,10 @@ _LIBCPP_HIDE_FROM_ABI void __radix_sort_impl(
295295
}
296296
}
297297

298-
_LIBCPP_HIDE_FROM_ABI constexpr auto __to_unsigned(bool __b) { return __b; }
298+
_LIBCPP_HIDE_FROM_ABI constexpr auto __shift_to_unsigned(bool __b) { return __b; }
299299

300300
template <class _Ip>
301-
_LIBCPP_HIDE_FROM_ABI constexpr auto __to_unsigned(_Ip __n) {
301+
_LIBCPP_HIDE_FROM_ABI constexpr auto __shift_to_unsigned(_Ip __n) {
302302
constexpr const auto __min_value = numeric_limits<_Ip>::min();
303303
return static_cast<make_unsigned_t<_Ip> >(__n ^ __min_value);
304304
}
@@ -319,7 +319,7 @@ __radix_sort(_RandomAccessIterator1 __first,
319319
_RandomAccessIterator2 __buffer,
320320
_Map __map,
321321
_Radix __radix) {
322-
auto __map_to_unsigned = [__map = std::move(__map)](const auto& x) { return std::__to_unsigned(__map(x)); };
322+
auto __map_to_unsigned = [__map = std::move(__map)](const auto& x) { return std::__shift_to_unsigned(__map(x)); };
323323
std::__radix_sort_impl(__first, __last, __buffer, __map_to_unsigned, __radix);
324324
}
325325

0 commit comments

Comments
 (0)