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