File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
include/tao/json/events/ubjson Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -44,15 +44,15 @@ namespace tao
4444 {
4545 if ( ( v >= -128 ) && ( v <= 127 ) ) {
4646 os.put ( ' i' );
47- const std::int8_t x = v ;
47+ const std::int8_t x = static_cast < std:: int8_t >( v ) ;
4848 os.write ( reinterpret_cast < const char * >( &x ), sizeof ( x ) );
4949 }
5050 else if ( ( v >= -32768 ) && ( v <= 32767 ) ) {
5151 os.put ( ' I' );
5252 const std::uint16_t x = internal::h_to_be ( std::uint16_t ( v ) );
5353 os.write ( reinterpret_cast < const char * >( &x ), sizeof ( x ) );
5454 }
55- else if ( ( v >= -2147483648 ) && ( v <= 2147483647 ) ) {
55+ else if ( ( v >= -2147483648ll ) && ( v <= 2147483647ll ) ) {
5656 os.put ( ' l' );
5757 const std::uint32_t x = internal::h_to_be ( std::uint32_t ( v ) );
5858 os.write ( reinterpret_cast < const char * >( &x ), sizeof ( x ) );
@@ -68,7 +68,7 @@ namespace tao
6868 {
6969 if ( v <= 255 ) {
7070 os.put ( ' U' );
71- const std::uint8_t x = v ;
71+ const std::uint8_t x = static_cast < std:: uint8_t >( v ) ;
7272 os.write ( reinterpret_cast < const char * >( &x ), sizeof ( x ) );
7373 }
7474 else if ( v <= 32767 ) {
You can’t perform that action at this time.
0 commit comments