mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Fix prevMissing
This commit is contained in:
@@ -81,10 +81,10 @@ uint32 RangeSet::prevMissing (uint32 v) const
|
|||||||
BOOST_FOREACH (const value_type & it, mRanges)
|
BOOST_FOREACH (const value_type & it, mRanges)
|
||||||
{
|
{
|
||||||
if (contains (it, v))
|
if (contains (it, v))
|
||||||
return it.first - 1;
|
return (it.first == 0) ? absent : (it.first - 1);
|
||||||
|
|
||||||
if (it.first > (v + 1))
|
if (it.second < (v - 1))
|
||||||
return v + 1;
|
return v - 1;
|
||||||
}
|
}
|
||||||
return absent;
|
return absent;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user