Populous: The Beginning Script 3  1.0.0
Documentation for Populous Script 3 engine

◆ processList()

template<typename Lambda >
Thing * ObjectList::processList ( Lambda &&  f)

Definition at line 124 of file ObjectList.h.

125 {
126  if (_count)
127  {
128  auto it = _start;
129  _sit.push_back({ this, &it });
130  while (true)
131  {
132  if (!f(it->t_thing))
133  {
134  _sit.pop_back();
135  return it->t_thing;
136  }
137  if (!it || !it->next) break;
138  it = it->next;
139  }
140  _sit.pop_back();
141  }
142  return nullptr;
143 }
size_t _count
Definition: ObjectList.h:120
struct OBJLIST * _start
Definition: ObjectList.h:118
static eastl::vector< Internal_It > _sit
Definition: ObjectList.h:115

References _count, _sit, and _start.

Referenced by processList2().