Permalink
Browse files

Fix logic for determining whether user is getting on or off transit. #…

  • Loading branch information...
1 parent 9464394 commit ea36e3f60a2942e24a0921d22b6acbf17e691106 Matt Conway committed Aug 15, 2012
@@ -120,9 +120,10 @@ public State traverse(State state0, long arrivalTimeAtStop) {
TraverseMode mode = state0.getNonTransitMode(options);
// figure out the direction
- // XOR: http://stackoverflow.com/questions/726652
- boolean offTransit = !((boarding || options.isArriveBy()) &&
- !(boarding && options.isArriveBy()));
+ // it's leaving transit iff it's a boarding and is arrive by, or it's not a boarding and
+ // is not arrive by
+ boolean offTransit = (boarding && options.isArriveBy()) ||
+ (!boarding && !options.isArriveBy());
if (offTransit) {
int type;

0 comments on commit ea36e3f

Please sign in to comment.