summaryrefslogtreecommitdiffstats
path: root/DTArrays.c
diff options
context:
space:
mode:
Diffstat (limited to 'DTArrays.c')
-rw-r--r--DTArrays.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/DTArrays.c b/DTArrays.c
index 82fe51d..99088de 100644
--- a/DTArrays.c
+++ b/DTArrays.c
@@ -1,4 +1,4 @@
-#strict 2
+#strict 3
global func ArrayErase(array& arr, int index)
{
@@ -15,7 +15,7 @@ global func ArrayErase(array& arr, int index)
global func ArrayEraseItem(array& arr, item, bool multiple)
{
var index, count = 0;
- while((index = GetIndexOf2(item, arr)) != -1)
+ while((index = GetIndexOf(item, arr)) != -1)
{
ArrayErase(arr, index);
if(!multiple)
@@ -42,12 +42,8 @@ global func ArrayAppend(array& arr, value)
arr[] = value;
}
+// only here for backwards compatibility; use arr ..= append directly
global func ArrayAppendArray(array& arr, array append)
{
- var i = GetLength(arr);
- SetLength(arr, GetLength(arr) + GetLength(append));
- for(var val in append)
- {
- arr[i++] = val;
- }
+ arr ..= append;
}