| 120 | } |
| 121 | |
| 122 | void List::erase(int pos) |
| 123 | { |
| 124 | if (pos == 0) |
| 125 | { |
| 126 | pop_front(); |
| 127 | } |
| 128 | else |
| 129 | { |
| 130 | int length = size(); |
| 131 | if (pos < length) |
| 132 | { |
| 133 | ListItem *temp = at(pos); |
| 134 | |
| 135 | temp->previous->next = temp->next; |
| 136 | if (temp->next) |
| 137 | { |
| 138 | temp->next->previous = temp->previous; |
| 139 | } |
| 140 | } |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | void List::erase(ListItem *itemPtr) |
| 145 | { |
nothing calls this directly
no outgoing calls
no test coverage detected