mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Really fix prevMissing
This commit is contained in:
@@ -85,6 +85,10 @@ uint32 RangeSet::prevMissing (uint32 v) const
|
|||||||
{
|
{
|
||||||
checkInternalConsistency ();
|
checkInternalConsistency ();
|
||||||
|
|
||||||
|
// Handle the case where the loop reaches the terminating condition
|
||||||
|
//
|
||||||
|
result = v - 1;
|
||||||
|
|
||||||
for (const_reverse_iterator cur = mRanges.rbegin (); cur != mRanges.rend (); ++cur)
|
for (const_reverse_iterator cur = mRanges.rbegin (); cur != mRanges.rend (); ++cur)
|
||||||
{
|
{
|
||||||
// See if v is in the range
|
// See if v is in the range
|
||||||
@@ -116,8 +120,6 @@ uint32 RangeSet::prevMissing (uint32 v) const
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
result = v - 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bassert (result == absent || !hasValue (result));
|
bassert (result == absent || !hasValue (result));
|
||||||
|
|||||||
Reference in New Issue
Block a user