Browse Source

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.
pull/8/head
Anton Tarasenko 2 years ago
parent
commit
9c4966e93a
  1. 1
      sources/Data/Collections/ArrayList.uc
  2. 5
      sources/Data/Collections/ArrayListIterator.uc

1
sources/Data/Collections/ArrayList.uc

@ -165,7 +165,6 @@ public final function ArrayList Insert(int index, int count)
protected final function Swap(int index1, int index2)
{
local AcediaObject temporaryItem;
local int temporaryNumber;
// Swap object
temporaryItem = storedObjects[index1];

5
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 <https://www.gnu.org/licenses/>.
*/
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)

Loading…
Cancel
Save