- if ((action->getRemains() <= 0) &&
- (lmm_get_variable_weight(action->getVariable()) > 0)) {
- action->finish();
- action->setState(Action::State::done);
- action->gapRemove();
- } else if (((action->getMaxDuration() != NO_MAX_DURATION)
- && (action->getMaxDuration() <= 0))) {
+ if (((action->getRemains() <= 0) && (lmm_get_variable_weight(action->getVariable()) > 0)) ||
+ ((action->getMaxDuration() > NO_MAX_DURATION) && (action->getMaxDuration() <= 0))) {