0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 16:22:35 +01:00

ircd::ctx::list: Fix misleading reference.

This commit is contained in:
Jason Volk 2018-04-28 03:20:29 -07:00
parent cee9130108
commit 0f161f98e8
2 changed files with 6 additions and 10 deletions

View file

@ -37,8 +37,8 @@ struct ircd::ctx::list
ctx *tail {nullptr};
// Get next or prev entry in ctx
static const ctx *const &next(const ctx *const &);
static const ctx *const &prev(const ctx *const &);
static const ctx *next(const ctx *const &);
static const ctx *prev(const ctx *const &);
static ctx *&next(ctx *const &);
static ctx *&prev(ctx *const &);

View file

@ -1439,22 +1439,18 @@ ircd::ctx::list::next(ctx *const &c)
return c->node.next;
}
const ircd::ctx::ctx *const &
const ircd::ctx::ctx *
ircd::ctx::list::prev(const ctx *const &c)
{
assert(c);
const auto &node(c->node);
const ctx *const &ptr(node.prev);
return ptr;
return c->node.prev;
}
const ircd::ctx::ctx *const &
const ircd::ctx::ctx *
ircd::ctx::list::next(const ctx *const &c)
{
assert(c);
const auto &node(c->node);
const ctx *const &ptr(node.next);
return ptr;
return c->node.next;
}
///////////////////////////////////////////////////////////////////////////////