Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
henningandersen committed Jan 25, 2024
1 parent 84c4107 commit df46de0
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1419,23 +1419,26 @@ private void appendLevel1ToLevel0() {
var front1 = freqs[1];
if (front0 == null) {
freqs[0] = front1;
decrementFreqList(front1);
freqs[1] = null;
decrementFreqList(front1);
assert front1 == null || invariant(front1, true);
} else if (front1 != null){
} else if (front1 != null) {
var back0 = front0.prev;
var back1 = front1.prev;
assert invariant(front0, true);
assert invariant(front1, true);
assert invariant(back0, true);
assert invariant(back1, true);

decrementFreqList(front1);

front0.prev = back1;
back0.next = front1;
front1.prev = back0;
assert back1.next == null;

freqs[1] = null;

assert invariant(front0, true);
assert invariant(front1, true);
assert invariant(back0, true);
Expand Down

0 comments on commit df46de0

Please sign in to comment.