@@ -3811,15 +3811,16 @@ BOOST_CHARCONV_SAFEBUFFERS to_chars_result floff(const double x, int precision,
3811
3811
{
3812
3812
// Insert decimal dot.
3813
3813
decimal_dot_pos = buffer_starting_pos + decimal_exponent_normalized + 1 ;
3814
- std::memmove (buffer_starting_pos, buffer_starting_pos + 1 , decimal_dot_pos - buffer_starting_pos);
3814
+ std::memmove (buffer_starting_pos, buffer_starting_pos + 1 ,
3815
+ static_cast <std::size_t >(decimal_dot_pos - buffer_starting_pos));
3815
3816
*decimal_dot_pos = ' .' ;
3816
3817
}
3817
3818
else
3818
3819
{
3819
3820
// Print leading zeros and insert decimal dot.
3820
3821
int number_of_leading_zeros = -decimal_exponent_normalized - 1 ;
3821
- std::memmove (buffer_starting_pos + number_of_leading_zeros + 2 ,
3822
- buffer_starting_pos + 1 , buffer - buffer_starting_pos - 1 );
3822
+ std::memmove (buffer_starting_pos + number_of_leading_zeros + 2 , buffer_starting_pos + 1 ,
3823
+ static_cast <std:: size_t >( buffer - buffer_starting_pos - 1 ) );
3823
3824
std::memcpy (buffer_starting_pos, " 0." , 2 );
3824
3825
std::memset (buffer_starting_pos + 2 , ' 0' , static_cast <std::size_t >(number_of_leading_zeros));
3825
3826
buffer += number_of_leading_zeros + 1 ;
@@ -3855,7 +3856,8 @@ BOOST_CHARCONV_SAFEBUFFERS to_chars_result floff(const double x, int precision,
3855
3856
}
3856
3857
else if (decimal_dot_pos != buffer_starting_pos)
3857
3858
{
3858
- std::memmove (buffer_starting_pos, buffer_starting_pos + 1 , decimal_dot_pos - buffer_starting_pos);
3859
+ std::memmove (buffer_starting_pos, buffer_starting_pos + 1 ,
3860
+ static_cast <std::size_t >(decimal_dot_pos - buffer_starting_pos));
3859
3861
*decimal_dot_pos = ' .' ;
3860
3862
}
3861
3863
0 commit comments