Merge branch 'develop' of github.com:ripple/rippled into develop

This commit is contained in:
JoelKatz
2013-07-05 06:18:53 -07:00

View File

@@ -85,6 +85,10 @@ uint32 RangeSet::prevMissing (uint32 v) const
{
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)
{
// See if v is in the range
@@ -99,7 +103,7 @@ uint32 RangeSet::prevMissing (uint32 v) const
}
else if (v > cur->second)
{
// This range is "above" the interval
// v lies "above" the interval
if (v == cur->second + 1)
{
@@ -108,10 +112,6 @@ uint32 RangeSet::prevMissing (uint32 v) const
else
result = absent;
}
else
{
result = v - 1;
}
break;
}