Skip to content

Commit

Permalink
[Regression] Fix bitset64::setAllUntil assert false positive
Browse files Browse the repository at this point in the history
Regression happened in ceb7def
  • Loading branch information
darksylinc committed Aug 23, 2024
1 parent fcd7031 commit cd924f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions OgreMain/include/OgreBitset.inl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ namespace Ogre
OGRE_TEMPL_DECL
void cbitsetN<OGRE_TEMPL_USE>::setAllUntil( size_t position )
{
OGRE_ASSERT_MEDIUM( position < _N );
OGRE_ASSERT_MEDIUM( position <= _N );

const size_t numValuesFullSet = position >> _bits;

Expand Down Expand Up @@ -228,7 +228,7 @@ namespace Ogre
//-------------------------------------------------------------------------
void bitset64::setAllUntil( size_t position )
{
OGRE_ASSERT_MEDIUM( position < mBitsCapacity );
OGRE_ASSERT_MEDIUM( position <= mBitsCapacity );

const size_t numValuesFullSet = position >> 6u;

Expand Down Expand Up @@ -284,7 +284,7 @@ namespace Ogre
//-------------------------------------------------------------------------
size_t bitset64::numBitsSet( const size_t positionEnd ) const
{
OGRE_ASSERT_MEDIUM( positionEnd < mBitsCapacity );
OGRE_ASSERT_MEDIUM( positionEnd <= mBitsCapacity );
size_t retVal = 0u;
for( size_t i = 0u; i < positionEnd; )
{
Expand Down

0 comments on commit cd924f8

Please sign in to comment.