forked from boostorg/core
More -Wconversion fixes for GCC 10 and below
This commit is contained in:
@@ -24,7 +24,7 @@ int main()
|
||||
|
||||
x = 1;
|
||||
|
||||
for( int i = 0; i < 8; ++i, x <<= 1 )
|
||||
for( int i = 0; i < 8; ++i, x = static_cast<boost::uint8_t>( x << 1 ) )
|
||||
{
|
||||
BOOST_TEST_EQ( boost::core::bit_width( x ), i+1 );
|
||||
BOOST_TEST_EQ( boost::core::bit_width( static_cast<boost::uint8_t>( x | ( x >> 1 ) ) ), i+1 );
|
||||
@@ -39,7 +39,7 @@ int main()
|
||||
|
||||
x = 1;
|
||||
|
||||
for( int i = 0; i < 16; ++i, x <<= 1 )
|
||||
for( int i = 0; i < 16; ++i, x = static_cast<boost::uint16_t>( x << 1 ) )
|
||||
{
|
||||
BOOST_TEST_EQ( boost::core::bit_width( x ), i+1 );
|
||||
BOOST_TEST_EQ( boost::core::bit_width( static_cast<boost::uint16_t>( x | ( x >> 1 ) ) ), i+1 );
|
||||
|
Reference in New Issue
Block a user