From bb1428eeb14889890977d514dee84b78d400acb0 Mon Sep 17 00:00:00 2001 From: "Daniel J. Hofmann" Date: Wed, 2 Sep 2015 12:23:26 +0200 Subject: [PATCH] Remove unneeded semicola from profiles. Nothing fancy, does what it says. --- profiles/bicycle.lua | 10 +++++----- profiles/car.lua | 22 +++++++++++----------- profiles/foot.lua | 2 +- profiles/testbot.lua | 4 ++-- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/profiles/bicycle.lua b/profiles/bicycle.lua index 88709ec3c..ffc70b24f 100644 --- a/profiles/bicycle.lua +++ b/profiles/bicycle.lua @@ -120,7 +120,7 @@ local function parse_maxspeed(source) n = 0 end if string.match(source, "mph") or string.match(source, "mp/h") then - n = (n*1609)/1000; + n = (n*1609)/1000 end return n end @@ -155,7 +155,7 @@ function node_function (node, result) -- check if node is a traffic light local tag = node:get_value_by_key("highway") if tag and "traffic_signals" == tag then - result.traffic_lights = true; + result.traffic_lights = true end end @@ -226,15 +226,15 @@ function way_function (way, result) -- roundabout handling if junction and "roundabout" == junction then - result.roundabout = true; + result.roundabout = true end -- speed local bridge_speed = bridge_speeds[bridge] if (bridge_speed and bridge_speed > 0) then - highway = bridge; + highway = bridge if duration and durationIsValid(duration) then - result.duration = math.max( parseDuration(duration), 1 ); + result.duration = math.max( parseDuration(duration), 1 ) end result.forward_mode = mode_movable_bridge result.backward_mode = mode_movable_bridge diff --git a/profiles/car.lua b/profiles/car.lua index 03ca924dc..02fa19494 100644 --- a/profiles/car.lua +++ b/profiles/car.lua @@ -159,7 +159,7 @@ local function parse_maxspeed(source) local n = tonumber(source:match("%d*")) if n then if string.match(source, "mph") or string.match(source, "mp/h") then - n = (n*1609)/1000; + n = (n*1609)/1000 end else -- parse maxspeed like FR:urban @@ -208,7 +208,7 @@ function node_function (node, result) -- check if node is a traffic light local tag = node:get_value_by_key("highway") if tag and "traffic_signals" == tag then - result.traffic_lights = true; + result.traffic_lights = true end end @@ -252,10 +252,10 @@ function way_function (way, result) -- handling ferries and piers local route_speed = speed_profile[route] if (route_speed and route_speed > 0) then - highway = route; + highway = route local duration = way:get_value_by_key("duration") if duration and durationIsValid(duration) then - result.duration = max( parseDuration(duration), 1 ); + result.duration = max( parseDuration(duration), 1 ) end result.forward_mode = mode_ferry result.backward_mode = mode_ferry @@ -267,10 +267,10 @@ function way_function (way, result) local bridge_speed = speed_profile[bridge] local capacity_car = way:get_value_by_key("capacity:car") if (bridge_speed and bridge_speed > 0) and (capacity_car ~= 0) then - highway = bridge; + highway = bridge local duration = way:get_value_by_key("duration") if duration and durationIsValid(duration) then - result.duration = max( parseDuration(duration), 1 ); + result.duration = max( parseDuration(duration), 1 ) end result.forward_mode = mode_movable_bridge result.backward_mode = mode_movable_bridge @@ -355,7 +355,7 @@ function way_function (way, result) end if junction and "roundabout" == junction then - result.roundabout = true; + result.roundabout = true end -- Set access restriction flag if access is allowed under certain restrictions only @@ -413,19 +413,19 @@ function way_function (way, result) -- scale speeds to get better avg driving times if result.forward_speed > 0 then - local scaled_speed = result.forward_speed*speed_reduction + 11; + local scaled_speed = result.forward_speed*speed_reduction + 11 local penalized_speed = math.huge if width <= 3 or (lanes <= 1 and is_bidirectional) then - penalized_speed = result.forward_speed / 2; + penalized_speed = result.forward_speed / 2 end result.forward_speed = math.min(penalized_speed, scaled_speed) end if result.backward_speed > 0 then - local scaled_speed = result.backward_speed*speed_reduction + 11; + local scaled_speed = result.backward_speed*speed_reduction + 11 local penalized_speed = math.huge if width <= 3 or (lanes <= 1 and is_bidirectional) then - penalized_speed = result.backward_speed / 2; + penalized_speed = result.backward_speed / 2 end result.backward_speed = math.min(penalized_speed, scaled_speed) end diff --git a/profiles/foot.lua b/profiles/foot.lua index 566425f3b..3d676ba3b 100644 --- a/profiles/foot.lua +++ b/profiles/foot.lua @@ -161,7 +161,7 @@ function way_function (way, result) -- roundabouts if "roundabout" == junction then - result.roundabout = true; + result.roundabout = true end -- speed diff --git a/profiles/testbot.lua b/profiles/testbot.lua index 7bd141635..6b10d04e2 100644 --- a/profiles/testbot.lua +++ b/profiles/testbot.lua @@ -49,7 +49,7 @@ function node_function (node, result) local traffic_signal = node:get_value_by_key("highway") if traffic_signal and traffic_signal == "traffic_signals" then - result.traffic_lights = true; + result.traffic_lights = true -- TODO: a way to set the penalty value end end @@ -78,7 +78,7 @@ function way_function (way, result) local speed_back = speed_forw if highway == "river" then - local temp_speed = speed_forw; + local temp_speed = speed_forw result.forward_mode = 3 result.backward_mode = 4 speed_forw = temp_speed*1.5