aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/lib
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-05-16 07:08:07 +1000
committerDavid Walter Seikel2014-05-16 07:08:07 +1000
commit7cf594df4ddb4f76ef4230c78e100044cda8fb21 (patch)
tree916803f8ff918b197172d8bd439c7b8d3d5a7619 /lib
parentActually typecast to list / table. (diff)
downloadSledjHamr-7cf594df4ddb4f76ef4230c78e100044cda8fb21.zip
SledjHamr-7cf594df4ddb4f76ef4230c78e100044cda8fb21.tar.gz
SledjHamr-7cf594df4ddb4f76ef4230c78e100044cda8fb21.tar.bz2
SledjHamr-7cf594df4ddb4f76ef4230c78e100044cda8fb21.tar.xz
Fix up the various list concatenations, and mark one as not being tested yet.
Diffstat (limited to 'lib')
-rw-r--r--lib/LSL.lua16
1 files changed, 1 insertions, 15 deletions
diff --git a/lib/LSL.lua b/lib/LSL.lua
index 4ec64b5..e783087 100644
--- a/lib/LSL.lua
+++ b/lib/LSL.lua
@@ -986,7 +986,7 @@ end
986 986
987-- Misc support functions. 987-- Misc support functions.
988 988
989function LSL.listAddList(a, b) 989function LSL.listAdd(a, b)
990 local i = 1 990 local i = 1
991 local result = {} 991 local result = {}
992 992
@@ -1007,20 +1007,6 @@ function LSL.listAddList(a, b)
1007 return result; 1007 return result;
1008end 1008end
1009 1009
1010function LSL.listAdd(a, b)
1011 local i = 1
1012 local result = {}
1013
1014 for j, v in ipairs(a) do
1015 i = i + 1
1016 table.insert(result, i, v)
1017 end
1018
1019 table.insert(result, i, b)
1020
1021 return result;
1022end
1023
1024function LSL.listConcat(a, b) 1010function LSL.listConcat(a, b)
1025 local i = table.maxn(a) 1011 local i = table.maxn(a)
1026 local result = a 1012 local result = a