mirror of
https://github.com/boostorg/core.git
synced 2025-11-28 21:30:09 +01:00
More -Wconversion fixes for GCC 10 and below
This commit is contained in:
@@ -28,7 +28,7 @@ int main()
|
||||
|
||||
x = 2;
|
||||
|
||||
for( int i = 1; i < 8; ++i, x <<= 1 )
|
||||
for( int i = 1; i < 8; ++i, x = static_cast<boost::uint8_t>( x << 1 ) )
|
||||
{
|
||||
BOOST_TEST_EQ( boost::core::has_single_bit( x ), true );
|
||||
BOOST_TEST_EQ( boost::core::has_single_bit( static_cast<boost::uint8_t>( x | ( x >> 1 ) ) ), false );
|
||||
@@ -47,7 +47,7 @@ int main()
|
||||
|
||||
x = 2;
|
||||
|
||||
for( int i = 1; i < 16; ++i, x <<= 1 )
|
||||
for( int i = 1; i < 16; ++i, x = static_cast<boost::uint16_t>( x << 1 ) )
|
||||
{
|
||||
BOOST_TEST_EQ( boost::core::has_single_bit( x ), true );
|
||||
BOOST_TEST_EQ( boost::core::has_single_bit( static_cast<boost::uint16_t>( x | ( x >> 1 ) ) ), false );
|
||||
|
||||
Reference in New Issue
Block a user