From 03e69fe720c91c65b8cfe93f463dc6063ab287bd Mon Sep 17 00:00:00 2001 From: Yauheni Akhotnikau Date: Mon, 11 Jul 2022 14:10:14 +0300 Subject: [PATCH] Fix for warnings from clang-14. --- dev/restinio/utils/from_string_details.ipp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dev/restinio/utils/from_string_details.ipp b/dev/restinio/utils/from_string_details.ipp index 6400cbb7..a55b8f1c 100644 --- a/dev/restinio/utils/from_string_details.ipp +++ b/dev/restinio/utils/from_string_details.ipp @@ -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( + 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( + mapping_table[ static_cast< std::size_t >( *data_begin++ ) ] ); } return result; @@ -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( + mapping_table[ static_cast< std::size_t >( *data_begin++ ) ] ); } return result;