From d1b66e2657b8776135c6f7bc93acb1de9537178b Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Mon, 26 Feb 2018 21:43:02 -0800 Subject: [PATCH] ircd::m::v1: Remove all the static default_opts. --- include/ircd/m/v1/backfill.h | 2 -- include/ircd/m/v1/event.h | 2 -- include/ircd/m/v1/make_join.h | 2 -- include/ircd/m/v1/send_join.h | 2 -- include/ircd/m/v1/state.h | 2 -- ircd/m/v1.cc | 34 +++++++--------------------------- 6 files changed, 7 insertions(+), 37 deletions(-) diff --git a/include/ircd/m/v1/backfill.h b/include/ircd/m/v1/backfill.h index bbbc29b5a..8f2c53682 100644 --- a/include/ircd/m/v1/backfill.h +++ b/include/ircd/m/v1/backfill.h @@ -21,8 +21,6 @@ struct ircd::m::v1::backfill { struct opts; - static const opts default_opts; - explicit operator json::object() const { return json::object{in.content}; diff --git a/include/ircd/m/v1/event.h b/include/ircd/m/v1/event.h index 8cd9a940d..c70dbeaef 100644 --- a/include/ircd/m/v1/event.h +++ b/include/ircd/m/v1/event.h @@ -21,8 +21,6 @@ struct ircd::m::v1::event { struct opts; - static const opts default_opts; - explicit operator json::object() const { const json::object object{in.content}; diff --git a/include/ircd/m/v1/make_join.h b/include/ircd/m/v1/make_join.h index 2622e08f5..d548e4807 100644 --- a/include/ircd/m/v1/make_join.h +++ b/include/ircd/m/v1/make_join.h @@ -21,8 +21,6 @@ struct ircd::m::v1::make_join { struct opts; - static const opts default_opts; - operator json::object() const { return json::object{in.content}; diff --git a/include/ircd/m/v1/send_join.h b/include/ircd/m/v1/send_join.h index 705e56496..77a9d2af7 100644 --- a/include/ircd/m/v1/send_join.h +++ b/include/ircd/m/v1/send_join.h @@ -21,8 +21,6 @@ struct ircd::m::v1::send_join { struct opts; - static const opts default_opts; - operator json::array() const { return json::array{in.content}; diff --git a/include/ircd/m/v1/state.h b/include/ircd/m/v1/state.h index 8aa4000e1..3348f02fe 100644 --- a/include/ircd/m/v1/state.h +++ b/include/ircd/m/v1/state.h @@ -21,8 +21,6 @@ struct ircd::m::v1::state { struct opts; - static const opts default_opts; - explicit operator json::object() const { return json::object{in.content}; diff --git a/ircd/m/v1.cc b/ircd/m/v1.cc index 1391f2e5c..0ebab4d53 100644 --- a/ircd/m/v1.cc +++ b/ircd/m/v1.cc @@ -90,15 +90,11 @@ ircd::m::v1::send::send(const string_view &txnid, // v1/backfill.h // -decltype(ircd::m::v1::backfill::default_opts) -ircd::m::v1::backfill::default_opts -{}; - ircd::m::v1::backfill::backfill(const room::id &room_id, const mutable_buffer &buf) :backfill { - room_id, buf, default_opts + room_id, buf, opts{} } { } @@ -191,15 +187,11 @@ ircd::m::v1::backfill::backfill(const room::id &room_id, // v1/state.h // -decltype(ircd::m::v1::state::default_opts) -ircd::m::v1::state::default_opts -{}; - ircd::m::v1::state::state(const room::id &room_id, const mutable_buffer &buf) :state { - room_id, buf, default_opts + room_id, buf, opts{} } { } @@ -291,15 +283,11 @@ ircd::m::v1::state::state(const room::id &room_id, // v1/event.h // -decltype(ircd::m::v1::event::default_opts) -ircd::m::v1::event::default_opts -{}; - ircd::m::v1::event::event(const m::event::id &event_id, const mutable_buffer &buf) :event { - event_id, buf, default_opts + event_id, buf, opts{} } { } @@ -362,10 +350,6 @@ ircd::m::v1::event::event(const m::event::id &event_id, // v1/send_join.h // -decltype(ircd::m::v1::send_join::default_opts) -ircd::m::v1::send_join::default_opts -{}; - ircd::m::v1::send_join::send_join(const room::id &room_id, const user::id &user_id, const const_buffer &content, @@ -426,16 +410,12 @@ ircd::m::v1::send_join::send_join(const room::id &room_id, // v1/make_join.h // -decltype(ircd::m::v1::make_join::default_opts) -ircd::m::v1::make_join::default_opts -{}; - ircd::m::v1::make_join::make_join(const room::id &room_id, const user::id &user_id, const mutable_buffer &buf) :make_join { - room_id, user_id, buf, default_opts + room_id, user_id, buf, opts{} } { } @@ -525,7 +505,7 @@ ircd::m::v1::query::directory::directory(const id::room_alias &room_alias, query_arg_buf, "room_alias=%s", string_view{room_alias} }, buf, - opts + std::move(opts) } { } @@ -550,7 +530,7 @@ ircd::m::v1::query::profile::profile(const id::user &user_id, query_arg_buf, "user_id=%s", string_view{user_id} }, buf, - opts + std::move(opts) } { } @@ -580,7 +560,7 @@ ircd::m::v1::query::profile::profile(const id::user &user_id, field }, buf, - opts + std::move(opts) } { }