| 171 | } |
| 172 | |
| 173 | int List::find(ListItem *itemPtr) |
| 174 | { |
| 175 | int pos = 0; |
| 176 | ListItem *temp = head.next; |
| 177 | while (temp && temp != itemPtr) |
| 178 | { |
| 179 | temp = temp->next; |
| 180 | ++pos; |
| 181 | } |
| 182 | |
| 183 | if (temp && temp == itemPtr) |
| 184 | { |
| 185 | return pos; |
| 186 | } |
| 187 | else |
| 188 | { |
| 189 | return -1; |
| 190 | } |
| 191 | } |
nothing calls this directly
no outgoing calls
no test coverage detected