summaryrefslogtreecommitdiffstats
path: root/TOOLS
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-10-26 14:34:37 +0100
committerwm4 <wm4@nowhere>2014-10-26 14:34:37 +0100
commitdd91c09a710ca9caa103732878825c6ecbd97a65 (patch)
tree4b20466636913c44f283907dea4d93a418682728 /TOOLS
parent3a7ecf65e2d171c5d2993a2123f970e62be982b4 (diff)
downloadmpv-dd91c09a710ca9caa103732878825c6ecbd97a65.tar.bz2
mpv-dd91c09a710ca9caa103732878825c6ecbd97a65.tar.xz
TOOLS/lua/autoload: don't shadow local variable
"dir" is already used somewhere above. This was ok, but not nice.
Diffstat (limited to 'TOOLS')
-rw-r--r--TOOLS/lua/autoload.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/TOOLS/lua/autoload.lua b/TOOLS/lua/autoload.lua
index f6e9313f9a..ebea903a18 100644
--- a/TOOLS/lua/autoload.lua
+++ b/TOOLS/lua/autoload.lua
@@ -40,10 +40,10 @@ function find_and_add_entries()
return
end
local append = {[-1] = {}, [1] = {}}
- for dir = -1, 1, 2 do -- 2 iterations, with dir = -1 and +1
+ for direction = -1, 1, 2 do -- 2 iterations, with direction = -1 and +1
for i = 1, MAXENTRIES do
- local file = files[current + i * dir]
- local pl_e = pl[pl_current + i * dir]
+ local file = files[current + i * direction]
+ local pl_e = pl[pl_current + i * direction]
if file == nil or file[1] == "." then
break
end
@@ -53,7 +53,7 @@ function find_and_add_entries()
break
end
end
- if dir == -1 then
+ if direction == -1 then
if pl_current == 1 then -- never add additional entries in the middle
mp.msg.info("Prepending " .. file)
table.insert(append[-1], 1, file)