- /* Move to the *end* of the corresponding action set. This convention
- is used to speed up update_resource_state */
- action->getStateSet()->erase(action->getStateSet()->iterator_to(*action));
- action->stateSet_ = static_cast<CpuTiModel*>(model())->runningActionSetThatDoesNotNeedBeingChecked_;
- action->getStateSet()->push_back(*action);
+ /* Move to the *end* of the corresponding action set. This convention is used to speed up update_resource_state */
+ simgrid::xbt::intrusive_erase(*action->getStateSet(), *action);
+ action->stateSet_ = &static_cast<CpuTiModel*>(model())->runningActionSetThatDoesNotNeedBeingChecked_;
+ action->getStateSet()->push_back(*action);