Fixes #52: ("Invalid casting in BOOST_INTRUSIVE_BSR_INTRINSIC")

This commit is contained in:
Ion Gaztañaga committed 2020-08-31 23:15:19 +02:00
1 parent d8761780b0
commit d61acfb8cd
2 files changed
+10 -2

No files matched your search

+2 -2
View File
@@ -76,8 +76,8 @@ namespace detail {
inline std::size_t floor_log2 (std::size_t x)
{
unsigned long log2;
BOOST_INTRUSIVE_BSR_INTRINSIC( &log2, (unsigned long)x );
return log2;
BOOST_INTRUSIVE_BSR_INTRINSIC( &log2, x );
return static_cast<std::size_t>(log2);
}
#undef BOOST_INTRUSIVE_BSR_INTRINSIC