From 9c4966e93ad6ea6d44cfbcd2efa3ebd7da04242f Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Sun, 3 Jul 2022 00:05:02 +0700 Subject: [PATCH] Fix issues with ArrayList conversion We are just copying `DynamicArray` into `ArrayList` with slightly different behavior. There are still no tests and some small errors pop up due to changes being made. This patch fixes them. --- sources/Data/Collections/ArrayList.uc | 3 +-- sources/Data/Collections/ArrayListIterator.uc | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sources/Data/Collections/ArrayList.uc b/sources/Data/Collections/ArrayList.uc index 63547eb..e9f5054 100644 --- a/sources/Data/Collections/ArrayList.uc +++ b/sources/Data/Collections/ArrayList.uc @@ -164,8 +164,7 @@ public final function ArrayList Insert(int index, int count) */ protected final function Swap(int index1, int index2) { - local AcediaObject temporaryItem; - local int temporaryNumber; + local AcediaObject temporaryItem; // Swap object temporaryItem = storedObjects[index1]; diff --git a/sources/Data/Collections/ArrayListIterator.uc b/sources/Data/Collections/ArrayListIterator.uc index 9e42991..9f63233 100644 --- a/sources/Data/Collections/ArrayListIterator.uc +++ b/sources/Data/Collections/ArrayListIterator.uc @@ -17,7 +17,8 @@ * You should have received a copy of the GNU General Public License * along with Acedia. If not, see . */ -class ArrayListIterator extends Iter; +class ArrayListIterator extends Iter + dependson(ArrayList); var private ArrayList relevantCollection; var private int currentIndex; @@ -45,7 +46,7 @@ public function LeaveOnlyNotNone() skipNoneReferences = true; } -public function Iter Next() +public function Iter Next(optional bool deprecated) { local int collectionLength; if (!skipNoneReferences)