Only thing we changed was adding "Iterator::" to the member's qualification
| 98 | |
| 99 | // Only thing we changed was adding "Iterator::" to the member's qualification |
| 100 | SharedBox Truckload::Iterator::getNextBox() |
| 101 | { |
| 102 | if (!m_current) // If there's no current... |
| 103 | return getFirstBox(); // ...return the 1st Box |
| 104 | |
| 105 | m_current = m_current->m_next; // Move to the next package |
| 106 | |
| 107 | return m_current? m_current->m_box : nullptr; // Return its box (or nullptr...). |
| 108 | } |
| 109 | |
| 110 | void Truckload::addBox(SharedBox box) |
| 111 | { |