From 4db04c726c4c322c6f3c8d686cd6e2c6d1219716 Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Mon, 6 Mar 2023 03:25:39 +0700 Subject: [PATCH] Remove useless code from `ArrayList` --- sources/Data/Collections/ArrayList.uc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sources/Data/Collections/ArrayList.uc b/sources/Data/Collections/ArrayList.uc index 43c263a..b52bfb7 100644 --- a/sources/Data/Collections/ArrayList.uc +++ b/sources/Data/Collections/ArrayList.uc @@ -247,20 +247,15 @@ public final function ArrayList RemoveIndex(int index) } /** - * Validates item at `index`: in case it was erroneously deallocated while - * being stored in caller `ArrayList` - forgets stored `AcediaObject` - * reference. + * Validates item at `index`: whether it fits in current array bounds. * - * @param index Index of an item to validate/ + * @param index Index of an item to validate. * @return `true` if `index` is valid for `storedObjects` array. */ private final function bool ValidateIndex(int index) { - local AcediaObject item; - if (index < 0) return false; if (index >= storedObjects.length) return false; - item = storedObjects[index]; return true; }