Only thing we changed was adding "Iterator::" to the member's qualification
| 78 | |
| 79 | // Only thing we changed was adding "Iterator::" to the member's qualification |
| 80 | SharedBox Truckload::Iterator::getNextBox() |
| 81 | { |
| 82 | if (!m_current) // If there's no current... |
| 83 | return getFirstBox(); // ...return the 1st Box |
| 84 | |
| 85 | m_current = m_current->m_next; // Move to the next package |
| 86 | |
| 87 | return m_current? m_current->m_box : nullptr; // Return its box (or nullptr...). |
| 88 | } |
| 89 | |
| 90 | void Truckload::addBox(SharedBox box) |
| 91 | { |