From 67744cf73e15a74bc433d1b964ce01f627fdd227 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sun, 20 May 2018 05:11:17 -0700 Subject: [PATCH] ircd::m: Remove the room::state::opts. --- include/ircd/m/room.h | 15 --------------- ircd/m/room.cc | 13 +------------ 2 files changed, 1 insertion(+), 27 deletions(-) diff --git a/include/ircd/m/room.h b/include/ircd/m/room.h index 36623807c..e860c4903 100644 --- a/include/ircd/m/room.h +++ b/include/ircd/m/room.h @@ -280,27 +280,12 @@ struct ircd::m::room::state event::id::buf get(std::nothrow_t, const string_view &type, const string_view &state_key = "") const; event::id::buf get(const string_view &type, const string_view &state_key = "") const; - state(const m::room &, const opts &); state(const m::room &); state() = default; state(const state &) = delete; state &operator=(const state &) = delete; }; -struct ircd::m::room::state::opts -{ - /// If true, the state btree at the present state may become the source of - /// the data for this interface. This is only significant if no event_id - /// was specified in the room object, otherwise snapshot is implied at that - /// event. If false the faster sequential present state table is used; note - /// that the present state may change while you use this object. - /// - /// Also note that passing an event_id (implied snapshot) may still take - /// advantage of a rocksdb snapshot of the present state table and not the - /// btree as an optimization if possible. - bool snapshot {false}; -}; - /// Interface to the members of a room. /// /// This interface focuses specifically on room membership and its routines diff --git a/ircd/m/room.cc b/ircd/m/room.cc index 80880a5f0..524d509d9 100644 --- a/ircd/m/room.cc +++ b/ircd/m/room.cc @@ -570,15 +570,6 @@ ircd::m::room::messages::fetch(std::nothrow_t) // ircd::m::room::state::state(const m::room &room) -:state -{ - room, opts{} -} -{ -} - -ircd::m::room::state::state(const m::room &room, - const opts &opts) :room_id { room.room_id @@ -587,9 +578,7 @@ ircd::m::room::state::state(const m::room &room, { room.event_id? event::id::buf{room.event_id}: - opts.snapshot? - m::head(room_id): - event::id::buf{} + event::id::buf{} } ,root_id {