Replace C-style casts with static_cast
This commit is contained in:
parent
1cd9110327
commit
2897436c06
1 changed files with 6 additions and 6 deletions
|
@ -86,13 +86,13 @@ BOOST_AUTO_TEST_CASE( test_count_leading_ones )
|
|||
{
|
||||
BOOST_CHECK( count_leading_ones(0) == 0 );
|
||||
BOOST_CHECK( count_leading_ones(1) == 0 );
|
||||
BOOST_CHECK( count_leading_ones((boost::uint8_t) 0xFF) == 8 );
|
||||
BOOST_CHECK( count_leading_ones((boost::uint16_t) 0xFFFF) == 16 );
|
||||
BOOST_CHECK( count_leading_ones((boost::uint32_t) 0xFFFFFFFF) == 32 );
|
||||
BOOST_CHECK( count_leading_ones((boost::uint64_t) 0xFFFFFFFFFFFFFFFF)
|
||||
BOOST_CHECK( count_leading_ones(static_cast<boost::uint8_t>(0xFF)) == 8 );
|
||||
BOOST_CHECK( count_leading_ones(static_cast<boost::uint16_t>(0xFFFF)) == 16 );
|
||||
BOOST_CHECK( count_leading_ones(static_cast<boost::uint32_t>(0xFFFFFFFF)) == 32 );
|
||||
BOOST_CHECK( count_leading_ones(static_cast<boost::uint64_t>(0xFFFFFFFFFFFFFFFF))
|
||||
== 64 );
|
||||
BOOST_CHECK( count_leading_ones((boost::uint8_t) 0xF8) == 5 );
|
||||
BOOST_CHECK( count_leading_ones((boost::uint16_t) 54321) == 2 );
|
||||
BOOST_CHECK( count_leading_ones(static_cast<boost::uint8_t>(0xF8)) == 5 );
|
||||
BOOST_CHECK( count_leading_ones(static_cast<boost::uint16_t>(54321)) == 2 );
|
||||
}
|
||||
|
||||
/* vim: set ts=4 sw=4: */
|
||||
|
|
Loading…
Add table
Reference in a new issue