Skip to content

Commit

Permalink
Fix for warnings from clang-14.
Browse files Browse the repository at this point in the history
  • Loading branch information
eao197 committed Jul 11, 2022
1 parent 2702b42 commit 03e69fe
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions dev/restinio/utils/from_string_details.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -294,12 +294,14 @@ parse_integer_no_checks(
if( apply_minus_sign )
while( data_begin != data_end )
{
result = result*10 - mapping_table[ static_cast< std::size_t >( *data_begin++ ) ];
result = result*10 - static_cast<Integer>(
mapping_table[ static_cast< std::size_t >( *data_begin++ ) ] );
}
else
while( data_begin != data_end )
{
result = result*10 + mapping_table[ static_cast< std::size_t >( *data_begin++ ) ];
result = result*10 + static_cast<Integer>(
mapping_table[ static_cast< std::size_t >( *data_begin++ ) ] );
}

return result;
Expand All @@ -318,7 +320,8 @@ parse_integer_no_checks(

while( data_begin != data_end )
{
result = result * 10 + mapping_table[ static_cast< std::size_t >( *data_begin++ ) ];
result = result * 10 + static_cast<Integer>(
mapping_table[ static_cast< std::size_t >( *data_begin++ ) ] );
}

return result;
Expand Down

0 comments on commit 03e69fe

Please sign in to comment.