| 126 | } |
| 127 | |
| 128 | T get_at(unsigned pos) { |
| 129 | assert(num > 0 && pos < num && front); |
| 130 | /*if (num <= 0 || pos >= num || front == NULL) { |
| 131 | return nullptr; |
| 132 | }*/ |
| 133 | |
| 134 | T current = front; |
| 135 | |
| 136 | for (unsigned int i = 0; i < pos && i < num && current->next; i++) current = current->next; |
| 137 | |
| 138 | return current; |
| 139 | } |
| 140 | |
| 141 | __attribute__((always_inline)) inline unsigned get_length() { |
| 142 | return num; |
no outgoing calls
no test coverage detected