diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2016-01-09 11:55:21 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2016-01-09 11:55:21 +0100 |
commit | 458fbc78b2a678a01d148eb29d78a5cf80eb4d90 (patch) | |
tree | 69fd2655ba61223a45a5b5d8a011b1067d2bb838 /core | |
parent | bb6a234d6631ad5bdf6f43b9ba101d133d3b2ee2 (diff) | |
download | RustAndDust-458fbc78b2a678a01d148eb29d78a5cf80eb4d90.zip RustAndDust-458fbc78b2a678a01d148eb29d78a5cf80eb4d90.tar.gz |
ArrayListIt: support Iterator.remove()
Diffstat (limited to 'core')
-rw-r--r-- | core/src/ch/asynk/rustanddust/engine/util/ArrayListIt.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/src/ch/asynk/rustanddust/engine/util/ArrayListIt.java b/core/src/ch/asynk/rustanddust/engine/util/ArrayListIt.java index c9128f2..7c1e404 100644 --- a/core/src/ch/asynk/rustanddust/engine/util/ArrayListIt.java +++ b/core/src/ch/asynk/rustanddust/engine/util/ArrayListIt.java @@ -44,6 +44,8 @@ public class ArrayListIt<E> extends ArrayList<E> implements Iterator, Iterable<E @Override public void remove() { - throw new RuntimeException("Iterator.remove is not allowed in here bitch!"); + i -=1; + s -= 1; + remove(i); } } |