From aaf80932feba90caa2a288ca2cb7ad08c79eb49e Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Tue, 12 Feb 2019 17:47:08 -0800 Subject: [PATCH] ircd::m::room::auth: Simplify closure requirements. --- include/ircd/m/room/auth.h | 4 ++-- ircd/m_room.cc | 4 ++-- modules/console.cc | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/ircd/m/room/auth.h b/include/ircd/m/room/auth.h index edf0cdf94..c53a6f23f 100644 --- a/include/ircd/m/room/auth.h +++ b/include/ircd/m/room/auth.h @@ -15,8 +15,8 @@ /// struct ircd::m::room::auth { - using closure_bool = std::function; - using closure = std::function; + using closure_bool = std::function; + using closure = std::function; m::room room; diff --git a/ircd/m_room.cc b/ircd/m_room.cc index 6da71fde2..c0aef91ac 100644 --- a/ircd/m_room.cc +++ b/ircd/m_room.cc @@ -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; }}); } diff --git a/modules/console.cc b/modules/console.cc index 9e6eaf624..6615b6f44 100644 --- a/modules/console.cc +++ b/modules/console.cc @@ -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;