lf_queue: add iterator support

Allow range-for loop over an object returned by `pop_all()`
This commit is contained in:
Nekotekina 2019-01-03 18:18:31 +03:00
parent cfdf50dcff
commit 435f60d503
3 changed files with 154 additions and 41 deletions

View file

@ -246,9 +246,9 @@ error_code cellSysutilCheckCallback(ppu_thread& ppu)
const auto cbm = fxm::get_always<sysutil_cb_manager>();
for (auto list = cbm->registered.pop_all(); list; list = list->pop_all())
for (auto&& func : cbm->registered.pop_all())
{
if (s32 res = list->get()(ppu))
if (s32 res = func(ppu))
{
// Currently impossible
return not_an_error(res);