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