MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / atIndex

Method atIndex

src/OpenLoco/src/Vehicles/OrderManager.cpp:58–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56 }
57
58 Order* OrderRingView::atIndex(const uint8_t index) const
59 {
60 auto size = std::distance(begin(), end());
61 if (index >= size)
62 {
63 return nullptr;
64 }
65 auto chosenOrder = std::next(begin(), index);
66 return &(*chosenOrder);
67 }
68
69 OrderRingView::Iterator& OrderRingView::Iterator::operator++()
70 {

Callers 6

drawRoutingNumbersFunction · 0.80
onOrderMoveFunction · 0.80
onMouseUpFunction · 0.80
addNewOrderFunction · 0.80
scrollMouseDownFunction · 0.80
reverseVehicleOrderTableFunction · 0.80

Calls 2

beginFunction · 0.85
endFunction · 0.85

Tested by

no test coverage detected