Only thing we changed was adding "Iterator::" to the member's qualification
| 57 | |
| 58 | // Only thing we changed was adding "Iterator::" to the member's qualification |
| 59 | SharedBox Truckload::Iterator::getNextBox() |
| 60 | { |
| 61 | if (!m_current) // If there's no current... |
| 62 | return getFirstBox(); // ...return the 1st Box |
| 63 | |
| 64 | m_current = m_current->m_next; // Move to the next package |
| 65 | |
| 66 | return m_current? m_current->m_box : nullptr; // Return its box (or nullptr...). |
| 67 | } |
| 68 | |
| 69 | void Truckload::addBox(SharedBox box) |
| 70 | { |