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

Method getNextBox

Examples/Modules/Chapter 13/Ex13_10/Truckload.cpp:59–67  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

57
58// Only thing we changed was adding "Iterator::" to the member's qualification
59SharedBox Truckload::Iterator::getNextBox()
60{
61 if (!m_current) // If there's no current...
62 return getFirstBox(); // ...return the 1st Box
63
64 m_current = m_current->m_next; // Move to the next package
65
66 return m_current? m_current->m_box : nullptr; // Return its box (or nullptr...).
67}
68
69void Truckload::addBox(SharedBox box)
70{

Callers 1

Truckload.cppFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected