mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 18:22:50 +01:00
ircd:Ⓜ️:event: Typedef an idx_range pair.
This commit is contained in:
parent
c0009a0745
commit
c969eb2792
2 changed files with 3 additions and 2 deletions
|
@ -51,6 +51,7 @@ struct ircd::m::event
|
|||
using keys = json::keys<event>;
|
||||
using id = m::id::event;
|
||||
using idx = uint64_t;
|
||||
using idx_range = std::pair<idx, idx>;
|
||||
using closure = std::function<void (const event &)>;
|
||||
using closure_bool = std::function<bool (const event &)>;
|
||||
using closure_idx = std::function<void (const idx &)>;
|
||||
|
|
|
@ -26,14 +26,14 @@ namespace ircd::m::events
|
|||
/// (event::idx of 0 is a sentinel)
|
||||
///
|
||||
struct ircd::m::events::range
|
||||
:std::pair<event::idx, event::idx>
|
||||
:event::idx_range
|
||||
{
|
||||
const event::fetch::opts *fopts {nullptr};
|
||||
|
||||
range(const event::idx &start,
|
||||
const event::idx &stop = -1,
|
||||
const event::fetch::opts *const &fopts = nullptr)
|
||||
:std::pair<event::idx, event::idx>{start, stop}
|
||||
:event::idx_range{start, stop}
|
||||
,fopts{fopts}
|
||||
{}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue