Fix number of changes
ClosedPublic

Authored by nicolasfella on Jul 11 2019, 5:15 PM.

Details

Summary

If a journey consists of n sections there are n-1 changes, not n.

Test Plan

Trip from Würzburg over Bamberg to Berlin shows 1 change instead of 2 in my app

Diff Detail

Repository
R1032 KPublicTransport
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
nicolasfella requested review of this revision.Jul 11 2019, 5:15 PM
nicolasfella created this revision.
vkrause accepted this revision.Jul 11 2019, 5:17 PM

Basically correct, but I think this needs a std::max(0, ...) around it, to cover walk-only journeys.

This revision is now accepted and ready to land.Jul 11 2019, 5:17 PM
This revision was automatically updated to reflect the committed changes.