mirror of
https://github.com/matrix-construct/construct
synced 2024-09-27 11:18:51 +02:00
ircd:Ⓜ️:room::state::space: Cleanup/simplify w/ structured bindings.
This commit is contained in:
parent
48ee5e01d5
commit
6e49f8ae6b
1 changed files with 5 additions and 5 deletions
|
@ -2848,21 +2848,21 @@ const
|
||||||
|
|
||||||
for(; it; ++it)
|
for(; it; ++it)
|
||||||
{
|
{
|
||||||
const auto &key
|
const auto &[_type, _state_key, _depth, _event_idx]
|
||||||
{
|
{
|
||||||
dbs::room_state_space_key(it->first)
|
dbs::room_state_space_key(it->first)
|
||||||
};
|
};
|
||||||
|
|
||||||
if(type && std::get<0>(key) != type)
|
if(type && type != _type)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if(state_key && std::get<1>(key) != state_key)
|
if(state_key && state_key != _state_key)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if(depth > -1 && std::get<2>(key) != depth)
|
if(depth >= 0 && depth != _depth)
|
||||||
break;
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue