Skip to content

Commit

Permalink
avoid creating a vla
Browse files Browse the repository at this point in the history
  • Loading branch information
cor3ntin committed Oct 9, 2024
1 parent 80b832e commit dc374cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libcxx/include/__algorithm/swap_ranges.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ __swap_ranges(_ForwardIterator1 __first1, _Sentinel1 __last1, _ForwardIterator2
size_t __chunk = __numBytes / __size;
size_t __rem = __numBytes % __size;

char __buffer[__size];
char __buffer[512];
if (__chunk > 0) {
for (std::size_t __n = 0; __n < __chunk; __n++, __aptr += __size, __bptr += __size) {
__builtin_memcpy(__buffer, __aptr, __size);
Expand Down

0 comments on commit dc374cc

Please sign in to comment.