| 132 | } |
| 133 | |
| 134 | bool Truckload::removeBox(SharedBox boxToRemove) |
| 135 | { |
| 136 | for (auto* current{ m_head }; current != nullptr; current = current->m_next) |
| 137 | { |
| 138 | if (current->m_box == boxToRemove) // We found the Box! |
| 139 | { |
| 140 | removePackage(current); |
| 141 | return true; |
| 142 | } |
| 143 | } |
| 144 | |
| 145 | return false; // Return false: boxToRemove was not found |
| 146 | } |
| 147 | |
| 148 | bool Truckload::removeBox(Iterator iter) |
| 149 | { |