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

Method getNextBox

Exercises/Modules/Chapter 20/Soln20_01/Truckload.cpp:41–49  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

39
40// Only thing we changed was adding "Iterator::" to the member's qualification
41SharedBox Truckload::Iterator::getNextBox()
42{
43 if (m_current == m_boxes->end()) // If there's no current...
44 return getFirstBox(); // ...return the 1st Box
45
46 ++m_current; // Move to the next package
47
48 return m_current != m_boxes->end() ? *m_current : SharedBox{};
49}
50
51void Truckload::addBox(SharedBox box)
52{

Callers 1

Truckload.cppFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected