summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-01-09 11:55:21 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2016-01-09 11:55:21 +0100
commit458fbc78b2a678a01d148eb29d78a5cf80eb4d90 (patch)
tree69fd2655ba61223a45a5b5d8a011b1067d2bb838 /core/src
parentbb6a234d6631ad5bdf6f43b9ba101d133d3b2ee2 (diff)
downloadRustAndDust-458fbc78b2a678a01d148eb29d78a5cf80eb4d90.zip
RustAndDust-458fbc78b2a678a01d148eb29d78a5cf80eb4d90.tar.gz
ArrayListIt: support Iterator.remove()
Diffstat (limited to 'core/src')
-rw-r--r--core/src/ch/asynk/rustanddust/engine/util/ArrayListIt.java4
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);
}
}