Remove redundant MobRepository access

This commit is contained in:
atomicint committed 2015-03-29 18:59:25 -04:00
1 parent cf2f06c702
commit 218739a4ff
1 file changed
+3 -3
+3 -3
View File
@@ -49,11 +49,11 @@ public final class MobRepository<T extends Mob> implements Iterable<T> {
@Override
public boolean hasNext() {
if (foundIndex == repository.size()) {
if (foundIndex == size()) {
return false;
}
while (currentIndex < repository.capacity()) {
while (currentIndex < capacity()) {
if (mobs[currentIndex++] != null) {
foundIndex++;
return true;
@@ -64,7 +64,7 @@ public final class MobRepository<T extends Mob> implements Iterable<T> {
@Override
public T next() {
return repository.get(currentIndex);
return get(currentIndex);
}
@Override