Skip to content

Commit

Permalink
revert change to List.iterator, mark 0.2.0-alpha2
Browse files Browse the repository at this point in the history
  • Loading branch information
ztellman committed Apr 19, 2020
1 parent 95ea800 commit 27db64e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
(cemerick.pomegranate.aether/register-wagon-factory!
"http" #(org.apache.maven.wagon.providers.http.HttpWagon.))

(defproject io.lacuna/bifurcan "0.2.0-alpha1"
(defproject io.lacuna/bifurcan "0.2.0-alpha2"
:java-source-paths ["src"]
:dependencies []
:test-selectors {:default #(not
Expand Down
8 changes: 4 additions & 4 deletions src/io/lacuna/bifurcan/List.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,18 +138,18 @@ public List<V> set(long idx, V value) {
}

@Override
public Iterator<V> iterator(long startIndex) {
public Iterator<V> iterator() {

final Object[] initChunk;
final int initOffset, initLimit;
final long size = size();
final long rootSize = root.size();

if (prefixLen > startIndex) {
if (prefixLen > 0) {
initChunk = prefix;
initOffset = pIdx(0);
initLimit = prefix.length;
} else if (rootSize > startIndex) {
} else if (rootSize > 0) {
initChunk = (Object[]) root.nth(0, true);
initOffset = 0;
initLimit = initChunk.length;
Expand All @@ -161,7 +161,7 @@ public Iterator<V> iterator(long startIndex) {

return new Iterator<V>() {

long idx = startIndex;
long idx = 0;

Object[] chunk = initChunk;
int offset = initOffset;
Expand Down

0 comments on commit 27db64e

Please sign in to comment.