Skip to content

Commit f26f238

Browse files
committed
cleanup: undo unnecessary temp variable
1 parent af79957 commit f26f238

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

libcxx/include/__algorithm/stable_sort.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,7 @@ _LIBCPP_HIDE_FROM_ABI void __insertion_sort_move(
5555
value_type* __j2 = __last2;
5656
value_type* __i2 = __j2;
5757
if (__comp(*__first1, *--__i2)) {
58-
{
59-
value_type& __tmp = *__i2;
60-
std::__construct_at(__j2, std::move(__tmp));
61-
}
58+
std::__construct_at(__j2, std::move(*__i2));
6259
__d.template __incr<value_type>();
6360
for (--__j2; __i2 != __first2 && __comp(*__first1, *--__i2); --__j2)
6461
*__j2 = std::move(*__i2);

0 commit comments

Comments
 (0)