diff options
author | Zughy <63455151+Zughy@users.noreply.github.com> | 2022-05-08 19:11:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-08 19:11:15 +0200 |
commit | 6f0c966877f83f585c6b3fd26f8b70e5d22525b3 (patch) | |
tree | 767c16b950759f3f1a4c69b6467106f6c91ecd6e | |
parent | f10a260301df44362f2496de4eadc8a8170e10ab (diff) | |
download | minetest-6f0c966877f83f585c6b3fd26f8b70e5d22525b3.tar.gz minetest-6f0c966877f83f585c6b3fd26f8b70e5d22525b3.tar.bz2 minetest-6f0c966877f83f585c6b3fd26f8b70e5d22525b3.zip |
Remove unused variable WARN_INIT
-rw-r--r-- | builtin/common/strict.lua | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/builtin/common/strict.lua b/builtin/common/strict.lua index ccde9676b..f46234dc6 100644 --- a/builtin/common/strict.lua +++ b/builtin/common/strict.lua @@ -1,8 +1,3 @@ - --- Always warn when creating a global variable, even outside of a function. --- This ignores mod namespaces (variables with the same name as the current mod). -local WARN_INIT = false - local getinfo = debug.getinfo function core.global_exists(name) @@ -33,11 +28,6 @@ function meta:__newindex(name, value) end declared[name] = true end - -- Ignore mod namespaces - if WARN_INIT and name ~= core.get_current_modname() then - core.log("warning", ("Global variable %q created at %s.") - :format(name, desc)) - end rawset(self, name, value) end @@ -54,4 +44,3 @@ function meta:__index(name) end setmetatable(_G, meta) - |