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

Method getNextBox

Exercises/NoModules/Chapter 19/Soln19_05/Truckload.cpp:80–88  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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

Callers 1

Truckload.cppFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected