0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-26 08:42:34 +01:00

ircd:Ⓜ️:room::state::space: Cleanup/simplify w/ structured bindings.

This commit is contained in:
Jason Volk 2019-08-18 04:11:35 -07:00
parent 48ee5e01d5
commit 6e49f8ae6b

View file

@ -2848,21 +2848,21 @@ const
for(; it; ++it)
{
const auto &key
const auto &[_type, _state_key, _depth, _event_idx]
{
dbs::room_state_space_key(it->first)
};
if(type && std::get<0>(key) != type)
if(type && type != _type)
break;
if(state_key && std::get<1>(key) != state_key)
if(state_key && state_key != _state_key)
break;
if(depth > -1 && std::get<2>(key) != depth)
if(depth >= 0 && depth != _depth)
break;
if(!closure(std::get<0>(key), std::get<1>(key), std::get<2>(key), std::get<3>(key)))
if(!closure(_type, _state_key, _depth, _event_idx))
return false;
}