MCPcopy Create free account
hub / github.com/Apress/beginning-cpp20 / getNextBox

Method getNextBox

Exercises/Modules/Chapter 12/Soln12_07/Truckload.cpp:94–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94SharedBox Truckload::Iterator::getNextBox()
95{
96 if (!m_current) // If there's no current...
97 return getFirstBox(); // ...return the 1st Box
98
99 m_current = m_current->m_next; // Move to the next package
100
101 return m_current? m_current->m_box : nullptr; // Return its box (or nullptr...).
102}
103
104SharedBox Truckload::Iterator::getPreviousBox()
105{

Callers 1

findLargestBoxFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected