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

Method getNextBox

Exercises/Modules/Chapter 18/Soln18_01/Truckload.cpp:100–108  ·  view source on GitHub ↗

Only thing we changed was adding "Iterator::" to the member's qualification

Source from the content-addressed store, hash-verified

98
99// Only thing we changed was adding "Iterator::" to the member's qualification
100SharedBox 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
110void Truckload::addBox(SharedBox box)
111{

Callers 1

Truckload.cppFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected