| 102 | } |
| 103 | |
| 104 | SharedBox Truckload::Iterator::getPreviousBox() |
| 105 | { |
| 106 | if (!m_current) // If there's no current... |
| 107 | return getLastBox(); // ...return the last Box |
| 108 | |
| 109 | m_current = m_current->m_previous; // Move to the next package |
| 110 | |
| 111 | return m_current ? m_current->m_box : nullptr; // Return its box (or nullptr...). |
| 112 | } |
| 113 | |
| 114 | void Truckload::addBox(SharedBox box) |
| 115 | { |