| 53 | } |
| 54 | |
| 55 | SharedBox Truckload::getNextBox() |
| 56 | { |
| 57 | if (!m_current) // If there's no current... |
| 58 | return getFirstBox(); // ...return the 1st Box |
| 59 | |
| 60 | m_current = m_current->m_next; // Move to the next package |
| 61 | |
| 62 | return m_current? m_current->m_box : nullptr; // Return its box (or nullptr...). |
| 63 | } |
| 64 | |
| 65 | void Truckload::addBox(SharedBox box) |
| 66 | { |