| 31 | } |
| 32 | |
| 33 | Exec_UncompilationRuleSet::iterator |
| 34 | Exec_UncompilationRuleSet::erase( |
| 35 | const Exec_UncompilationRuleSet::iterator &it) |
| 36 | { |
| 37 | iterator last = std::prev(_rules.end()); |
| 38 | if (it != last) { |
| 39 | *it = std::move(*last); |
| 40 | } |
| 41 | |
| 42 | // To handle the case of growing the vector, resize needs a value to |
| 43 | // initialize new elements. However, we are only shrinking the vector, so |
| 44 | // this value will never be used. |
| 45 | _rules.resize( |
| 46 | _rules.size() - 1, |
| 47 | Exec_UncompilationRule( |
| 48 | Exec_NodeUncompilationTarget(0), |
| 49 | EsfEditReason::None)); |
| 50 | return it; |
| 51 | } |
| 52 | |
| 53 | std::string |
| 54 | Exec_UncompilationRuleSet::GetDescription() const |