Parsing duration of ferries before further computation
This commit is contained in:
parent
2d64dca565
commit
2185bb3327
@ -48,7 +48,6 @@ inline unsigned parseDuration(const std::string &s) {
|
||||
return 600*(hours*60+minutes);
|
||||
}
|
||||
return UINT_MAX;
|
||||
|
||||
}
|
||||
|
||||
inline int parseMaxspeed(std::string input) { //call-by-value on purpose.
|
||||
|
@ -145,7 +145,7 @@ function way_function (way, numberOfNodesInWay)
|
||||
(speed_profile[man_made] ~= nil and speed_profile[man_made] > 0)
|
||||
then
|
||||
if durationIsValid(duration) then
|
||||
way.speed = math.max( duration / math.max(1, numberOfNodesInWay-1) );
|
||||
way.speed = math.max( parseDuration(duration) / math.max(1, numberOfNodesInWay-1) );
|
||||
way.is_duration_set = true;
|
||||
end
|
||||
way.direction = Way.bidirectional;
|
||||
|
Loading…
Reference in New Issue
Block a user