0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2025-01-14 00:34:18 +01:00

ircd::db: Fixes for reverse iteration.

This commit is contained in:
Jason Volk 2017-09-23 00:27:25 -07:00
parent 703121f867
commit 1a35514653
2 changed files with 2 additions and 5 deletions

View file

@ -175,7 +175,7 @@ ircd::db::cursor<d, tuple>::const_iterator_base<index_iterator>::const_iterator_
}
,invalid
{
!bool(this->idx) || !row.valid(this->idx->first)
!this->idx || !row.valid(this->idx->first)
}
{
if(invalid)

View file

@ -1800,10 +1800,7 @@ ircd::db::index::rbegin(const string_view &key,
opts |= get::NO_CACHE;
if(seek(ret, key, opts))
{
while(seek(ret, pos::NEXT, opts));
seek(ret, pos::PREV, opts);
}
seek(ret, pos::BACK, opts);
return ret;
}