diff options
| author | Markus Mittendrein <maxmitti@maxmitti.tk> | 2022-03-16 13:57:52 +0100 |
|---|---|---|
| committer | Markus Mittendrein <maxmitti@maxmitti.tk> | 2022-03-16 13:57:52 +0100 |
| commit | 9896f4b328e45e192e8163f264b36f97078e4a99 (patch) | |
| tree | d940bc66884bd7db971fb3a0dbad809ec43a0591 /DTArrays.c | |
| parent | 4a7ce9ade25b0ec98866e41824c509b65f673330 (diff) | |
| download | System.c4g-9896f4b328e45e192e8163f264b36f97078e4a99.tar.gz System.c4g-9896f4b328e45e192e8163f264b36f97078e4a99.zip | |
Update DTArrays to #strict 3
Diffstat (limited to 'DTArrays.c')
| -rw-r--r-- | DTArrays.c | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -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;
}
|
