mirror of
https://github.com/matrix-construct/construct
synced 2024-09-26 02:18:53 +02:00
ircd:Ⓜ️:room::auth: Simplify closure requirements.
This commit is contained in:
parent
74fdda36e2
commit
aaf80932fe
3 changed files with 6 additions and 5 deletions
|
@ -15,8 +15,8 @@
|
|||
///
|
||||
struct ircd::m::room::auth
|
||||
{
|
||||
using closure_bool = std::function<bool (const event::idx &, const event &)>;
|
||||
using closure = std::function<void (const event::idx &, const event &)>;
|
||||
using closure_bool = std::function<bool (const event::idx &)>;
|
||||
using closure = std::function<void (const event::idx &)>;
|
||||
|
||||
m::room room;
|
||||
|
||||
|
|
|
@ -2059,9 +2059,9 @@ ircd::m::room::auth::for_each(const closure &c)
|
|||
const
|
||||
{
|
||||
for_each(closure_bool{[this, &c]
|
||||
(const auto &a, const auto &b)
|
||||
(const auto &event_idx)
|
||||
{
|
||||
c(a, b);
|
||||
c(event_idx);
|
||||
return true;
|
||||
}});
|
||||
}
|
||||
|
|
|
@ -8210,8 +8210,9 @@ console_cmd__room__auth(opt &out, const string_view &line)
|
|||
};
|
||||
|
||||
auth.for_each([&out]
|
||||
(const m::event::idx &idx, const m::event &event)
|
||||
(const m::event::idx &idx)
|
||||
{
|
||||
const m::event::fetch event{idx};
|
||||
out << idx
|
||||
<< " " << pretty_oneline(event)
|
||||
<< std::endl;
|
||||
|
|
Loading…
Reference in a new issue