diff --git a/include/ircd/m/room/room.h b/include/ircd/m/room/room.h index 424ee39f8..bc660e24a 100644 --- a/include/ircd/m/room/room.h +++ b/include/ircd/m/room/room.h @@ -187,9 +187,11 @@ struct ircd::m::room const vm::copts *const &copts, const event::fetch::opts *const &fopts = nullptr) noexcept; - room(const id &room_id = {}, + room(const id &room_id, const event::fetch::opts *const &fopts = nullptr) noexcept; + room() = default; + // Index of create event static event::idx index(const id &, std::nothrow_t); static event::idx index(const id &); @@ -229,7 +231,9 @@ ircd::m::room::room(const id &room_id, ,event_id{event_id? event::id{event_id} : event::id{}} ,copts{copts} ,fopts{fopts} -{} +{ + assert(room_id); +} inline ircd::m::room::room(const id &room_id, @@ -239,7 +243,9 @@ noexcept :room_id{room_id} ,copts{copts} ,fopts{fopts} -{} +{ + assert(room_id); +} inline ircd::m::room::room(const id &room_id, @@ -247,7 +253,9 @@ ircd::m::room::room(const id &room_id, noexcept :room_id{room_id} ,fopts{fopts} -{} +{ + assert(room_id); +} inline ircd::m::room::operator const ircd::m::room::id &() diff --git a/include/ircd/m/user/user.h b/include/ircd/m/user/user.h index 96bfee64b..c1774b357 100644 --- a/include/ircd/m/user/user.h +++ b/include/ircd/m/user/user.h @@ -74,13 +74,17 @@ struct ircd::m::user event::id::buf deoper(); event::id::buf oper(); - user(const id &user_id) - :user_id{user_id} - {} - + user(const id &user_id); user() = default; }; +inline +ircd::m::user::user(const id &user_id) +:user_id{user_id} +{ + assert(user_id); +} + inline ircd::m::user::operator const ircd::m::user::id &() const