Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix GCC 11 warnings: reading 1 or more bytes from a region of size 0 [-Wstringop-overread] Fix GCC 12 warnings: offset 1 is out of the bounds [0, 1] [-Warray-bounds] __builtin_memmove(__result, __first, sizeof(_Tp) * _Num); ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Loading branch information
4163e97
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shrink_to_fit() is C++11. Need a C++03 compatible replacement. Maybe swapping the vector with itself shuts the compiler up. Could you try this code?
4163e97
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and it works also.
4163e97
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good, committed in 1b3f49f