Skip to content

Commit 5425d91

Browse files
committed
remove deprecated function and use common.lua wipetable
1 parent 254a205 commit 5425d91

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

src/Export/Main.lua

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ USE_DAT64 = true
99
local ipairs = ipairs
1010
local t_insert = table.insert
1111
local t_remove = table.remove
12-
local t_maxn = table.maxn
1312
local m_ceil = math.ceil
1413
local m_max = math.max
1514
local m_min = math.min
@@ -111,16 +110,6 @@ function main:Init()
111110
print(string.format(...))
112111
end
113112

114-
function clearScriptOutput()
115-
if t_maxn(self.scriptOutput) == 0 then
116-
return
117-
end
118-
local removed = -1
119-
while removed ~= nil do
120-
removed = t_remove(self.scriptOutput)
121-
end
122-
end
123-
124113
function processTemplateFile(name, inDir, outDir, directiveTable)
125114
local state = { }
126115
local out = io.open(outDir..name..".lua", "w")
@@ -211,13 +200,13 @@ function main:Init()
211200
end
212201
}
213202
self.controls.clearOutput = new("ButtonControl", nil, {1190, 10, 100, 18}, "Clear", function()
214-
clearScriptOutput()
203+
wipeTable(self.scriptOutput)
215204
end) {
216205
shown = function()
217206
return not self.curDatFile
218207
end,
219208
enabled = function()
220-
return t_maxn(self.scriptOutput) > 0
209+
return #self.scriptOutput > 0
221210
end
222211
}
223212

0 commit comments

Comments
 (0)