Skip to content

Commit

Permalink
Assume Toll.HGV for all swiss roads
Browse files Browse the repository at this point in the history
  • Loading branch information
otbutz committed Aug 21, 2024
1 parent f474257 commit 80116fa
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,9 @@ public Toll getToll(ReaderWay readerWay, Toll currentToll) {
}

RoadClass roadClass = RoadClass.find(readerWay.getTag("highway", ""));
switch (roadClass) {
case MOTORWAY:
case TRUNK:
return Toll.ALL;
default:
return currentToll;
}
return switch (roadClass) {
case MOTORWAY, TRUNK -> Toll.ALL;
default -> Toll.HGV;
};
}
}

0 comments on commit 80116fa

Please sign in to comment.