Don't test for Tr::eq( c, one ) twice in init_from_string()

This commit is contained in:
Gennaro Prota
2025-09-11 14:49:11 +02:00
parent e00d9b30ae
commit 079cff781d

View File

@@ -2071,10 +2071,10 @@ dynamic_bitset< Block, AllocatorOrContainer >::init_from_string(
for ( ; i < m; ++i ) {
const CharT c = s[ ( pos + m - 1 ) - i ];
BOOST_ASSERT( Tr::eq( c, one ) || Tr::eq( c, BOOST_DYNAMIC_BITSET_WIDEN_CHAR( fac, '0' ) ) );
if ( Tr::eq( c, one ) ) {
set( i );
} else {
BOOST_ASSERT( Tr::eq( c, BOOST_DYNAMIC_BITSET_WIDEN_CHAR( fac, '0' ) ) );
}
}
}