Skip to content

Commit

Permalink
fix issues found by luacheck
Browse files Browse the repository at this point in the history
The variable shadowing causes bad results when used with LuaJIT.
  • Loading branch information
lonvia committed Feb 20, 2024
1 parent 5afd96d commit 781e83d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions settings/flex-base.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ local module = {}

local PRE_DELETE = nil
local PRE_EXTRAS = nil
local POST_DELETE = nil
local MAIN_KEYS = nil
local NAMES = nil
local ADDRESS_TAGS = nil
Expand Down Expand Up @@ -249,9 +250,9 @@ function Place:write_row(k, v, save_extra_mains)
}

if save_extra_mains then
for k, v in pairs(self.object.tags) do
if save_extra_mains(k, v) then
self.extratags[k] = nil
for tk, tv in pairs(self.object.tags) do
if save_extra_mains(tk, tv) then
self.extratags[tk] = nil
end
end
end
Expand Down Expand Up @@ -539,7 +540,7 @@ function module.set_unused_handling(data)
end
end

function set_relation_types(data)
function module.set_relation_types(data)
module.RELATION_TYPES = {}
for k, v in data do
if v == 'multipolygon' then
Expand Down

0 comments on commit 781e83d

Please sign in to comment.