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

Method getNextBox

Exercises/Modules/Chapter 13/Soln13_09/Truckload.cpp:78–86  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

76
77// Only thing we changed was adding "Iterator::" to the member's qualification
78SharedBox Truckload::Iterator::getNextBox()
79{
80 if (!m_current) // If there's no current...
81 return getFirstBox(); // ...return the 1st Box
82
83 m_current = m_current->m_next; // Move to the next package
84
85 return m_current? m_current->m_box : nullptr; // Return its box (or nullptr...).
86}
87
88void Truckload::addBox(SharedBox box)
89{

Callers 1

Truckload.cppFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected