diff options
author | David Walter Seikel | 2014-05-16 07:08:07 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-05-16 07:08:07 +1000 |
commit | 7cf594df4ddb4f76ef4230c78e100044cda8fb21 (patch) | |
tree | 916803f8ff918b197172d8bd439c7b8d3d5a7619 /lib | |
parent | Actually typecast to list / table. (diff) | |
download | SledjHamr-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.lua | 16 |
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 | ||
989 | function LSL.listAddList(a, b) | 989 | function 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; |
1008 | end | 1008 | end |
1009 | 1009 | ||
1010 | function 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; | ||
1022 | end | ||
1023 | |||
1024 | function LSL.listConcat(a, b) | 1010 | function LSL.listConcat(a, b) |
1025 | local i = table.maxn(a) | 1011 | local i = table.maxn(a) |
1026 | local result = a | 1012 | local result = a |