| 353 | } |
| 354 | |
| 355 | void replace_at(unsigned pos, T obj) { |
| 356 | assert(num > 0 && pos < num); |
| 357 | //if (num < 0 || pos >= num) return; |
| 358 | |
| 359 | acquireLock(&lock); |
| 360 | |
| 361 | ListNode<T>* current = front; |
| 362 | |
| 363 | for (unsigned int i = 0; i < pos; i++) current = current->next; |
| 364 | |
| 365 | if(current) |
| 366 | current->obj = obj; |
| 367 | |
| 368 | releaseLock(&lock); |
| 369 | } |
| 370 | |
| 371 | unsigned get_length() { |
| 372 | return num; |
nothing calls this directly
no outgoing calls
no test coverage detected