Only thing we changed was adding "Iterator::" to the member's qualification
| 39 | |
| 40 | // Only thing we changed was adding "Iterator::" to the member's qualification |
| 41 | SharedBox Truckload::Iterator::getNextBox() |
| 42 | { |
| 43 | if (m_current == m_boxes->end()) // If there's no current... |
| 44 | return getFirstBox(); // ...return the 1st Box |
| 45 | |
| 46 | ++m_current; // Move to the next package |
| 47 | |
| 48 | return m_current != m_boxes->end() ? *m_current : SharedBox{}; |
| 49 | } |
| 50 | |
| 51 | void Truckload::addBox(SharedBox box) |
| 52 | { |