mirror of
https://github.com/matrix-construct/construct
synced 2025-01-15 17:16:49 +01:00
ircd::db: Fixes for reverse iteration.
This commit is contained in:
parent
703121f867
commit
1a35514653
2 changed files with 2 additions and 5 deletions
|
@ -175,7 +175,7 @@ ircd::db::cursor<d, tuple>::const_iterator_base<index_iterator>::const_iterator_
|
||||||
}
|
}
|
||||||
,invalid
|
,invalid
|
||||||
{
|
{
|
||||||
!bool(this->idx) || !row.valid(this->idx->first)
|
!this->idx || !row.valid(this->idx->first)
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
if(invalid)
|
if(invalid)
|
||||||
|
|
|
@ -1800,10 +1800,7 @@ ircd::db::index::rbegin(const string_view &key,
|
||||||
|
|
||||||
opts |= get::NO_CACHE;
|
opts |= get::NO_CACHE;
|
||||||
if(seek(ret, key, opts))
|
if(seek(ret, key, opts))
|
||||||
{
|
seek(ret, pos::BACK, opts);
|
||||||
while(seek(ret, pos::NEXT, opts));
|
|
||||||
seek(ret, pos::PREV, opts);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue