0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-27 11:18:51 +02:00

ircd:Ⓜ️ Remove the room::state::opts.

This commit is contained in:
Jason Volk 2018-05-20 05:11:17 -07:00
parent 7e5b9b69ed
commit 67744cf73e
2 changed files with 1 additions and 27 deletions

View file

@ -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(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; 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(const m::room &);
state() = default; state() = default;
state(const state &) = delete; state(const state &) = delete;
state &operator=(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. /// Interface to the members of a room.
/// ///
/// This interface focuses specifically on room membership and its routines /// This interface focuses specifically on room membership and its routines

View file

@ -570,15 +570,6 @@ ircd::m::room::messages::fetch(std::nothrow_t)
// //
ircd::m::room::state::state(const m::room &room) 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_id
{ {
room.room_id room.room_id
@ -587,9 +578,7 @@ ircd::m::room::state::state(const m::room &room,
{ {
room.event_id? room.event_id?
event::id::buf{room.event_id}: event::id::buf{room.event_id}:
opts.snapshot? event::id::buf{}
m::head(room_id):
event::id::buf{}
} }
,root_id ,root_id
{ {