0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-16 17:08:20 +02:00

ircd:Ⓜ️:room: Use scope_restore here.

This commit is contained in:
Jason Volk 2019-07-07 03:58:35 -07:00
parent cf853cf9ad
commit 7f102e7f8c

View file

@ -3219,12 +3219,10 @@ const
// putting them back when we're finished. This requires a const_cast which
// should be okay here.
auto &room(const_cast<m::room &>(this->room));
const auto theirs{room.fopts};
room.fopts = &fopts;
const unwind reset{[&room, &theirs]
const scope_restore theirs
{
room.fopts = theirs;
}};
room.fopts, &fopts
};
return for_each(membership, event::closure_bool{[&closure]
(const event &event)