- ActionList *actionSet = getRunningActionSet();
- ActionList::iterator it(actionSet->begin());
- ActionList::iterator itend(actionSet->end());
- for (; it != itend; ++it) {
- CpuAction *action = static_cast<CpuAction*>(&*it);
- if (smaller < 0 || action->getLastUpdate() < smaller)
- smaller = action->getLastUpdate();
+ for (Action const& action : *getRunningActionSet()) {
+ if (smaller < 0 || action.getLastUpdate() < smaller)
+ smaller = action.getLastUpdate();