Skip to content

Commit

Permalink
Fixes from review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesj committed Feb 8, 2022
1 parent af4a397 commit 8dc5171
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class TransferMapper {
*
* @see <a href="https://github.com/google/transit/pull/303">GTFS proposal</a>
*/
private static final int NO_STAY_SEATED = 5;
private static final int STAY_SEATED_NOT_ALLOWED = 5;


private final RouteMapper routeMapper;
Expand Down Expand Up @@ -113,12 +113,11 @@ static TransferPriority mapTypeToPriority(int type) {
return TransferPriority.NOT_ALLOWED;
case GUARANTEED:
case MIN_TIME:
case NO_STAY_SEATED:
case STAY_SEATED:
case STAY_SEATED_NOT_ALLOWED:
return TransferPriority.ALLOWED;
case RECOMMENDED:
return TransferPriority.RECOMMENDED;
case STAY_SEATED:
return TransferPriority.PREFERRED;
}
throw new IllegalArgumentException("Mapping missing for type: " + type);
}
Expand Down Expand Up @@ -171,7 +170,7 @@ private TransferConstraint mapConstraint(Transfer rhs, Trip fromTrip, Trip toTri
// and not explicitly disallowed.
builder.staySeated(
rhs.getTransferType() == STAY_SEATED ||
(rhs.getTransferType() != NO_STAY_SEATED && sameBlockId(fromTrip, toTrip))
(rhs.getTransferType() != STAY_SEATED_NOT_ALLOWED && sameBlockId(fromTrip, toTrip))

);

Expand Down

0 comments on commit 8dc5171

Please sign in to comment.