mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +01:00
ircd:Ⓜ️ Add a room::origins::count()er.
This commit is contained in:
parent
763c14fb7b
commit
e95b61d46b
2 changed files with 14 additions and 0 deletions
|
@ -253,6 +253,7 @@ struct ircd::m::room::origins
|
|||
|
||||
bool test(const closure_bool &view) const;
|
||||
void for_each(const closure &view) const;
|
||||
size_t count() const;
|
||||
|
||||
origins(const m::room &room)
|
||||
:room{room}
|
||||
|
|
|
@ -643,6 +643,19 @@ const
|
|||
// room::origins
|
||||
//
|
||||
|
||||
size_t
|
||||
ircd::m::room::origins::count()
|
||||
const
|
||||
{
|
||||
size_t ret{0};
|
||||
for_each([&ret](const string_view &)
|
||||
{
|
||||
++ret;
|
||||
});
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
ircd::m::room::origins::for_each(const closure &view)
|
||||
const
|
||||
|
|
Loading…
Reference in a new issue