From: Sarah Hoffmann Date: Tue, 20 Feb 2024 09:43:51 +0000 (+0100) Subject: fix issues found by luacheck X-Git-Tag: v4.4.0~13^2 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/781e83ddc357cefe0242d8f8aa8e6ef6a963ccb6 fix issues found by luacheck The variable shadowing causes bad results when used with LuaJIT. --- diff --git a/settings/flex-base.lua b/settings/flex-base.lua index dc2c12ee..4d960d72 100644 --- a/settings/flex-base.lua +++ b/settings/flex-base.lua @@ -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 @@ -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 @@ -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