0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-25 05:18:23 +02:00

ircd:Ⓜ️:state: Use the appropriate codepath for undefined key dfs.

This commit is contained in:
Jason Volk 2018-02-11 14:55:33 -08:00
parent bbbb88fe46
commit dbdc4a94d2

View file

@ -120,7 +120,12 @@ void
ircd::m::state::for_each(const string_view &root,
const iter_closure &closure)
{
for_each(root, string_view{}, closure);
test(root, [&closure]
(const json::array &key, const string_view &val)
{
closure(key, val);
return false;
});
}
void
@ -140,7 +145,11 @@ bool
ircd::m::state::test(const string_view &root,
const iter_bool_closure &closure)
{
return test(root, string_view{}, closure);
return dfs(root, [&closure]
(const json::array &key, const string_view &val, const uint &, const uint &)
{
return closure(key, val);
});
}
bool