0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 10:12:39 +01:00

ircd:Ⓜ️:room::origins: Add a bool for_each() to eventually replace test().

This commit is contained in:
Jason Volk 2018-08-22 17:42:35 -07:00
parent 5ba5cea109
commit cbd149b650
2 changed files with 11 additions and 0 deletions

View file

@ -344,6 +344,7 @@ struct ircd::m::room::origins
bool _test_(const closure_bool &view) const;
bool test(const closure_bool &view) const;
bool for_each(const closure_bool &view) const;
void for_each(const closure &view) const;
bool has(const string_view &origin) const;
bool only(const string_view &origin) const;

View file

@ -1783,6 +1783,16 @@ const
});
}
bool
ircd::m::room::origins::for_each(const closure_bool &view)
const
{
return !test([&view](const string_view &origin)
{
return !view(origin);
});
}
bool
ircd::m::room::origins::test(const closure_bool &view)
const