Skip to content

Commit

Permalink
Uses ArrayHelper.prefix() in constructor.
Browse files Browse the repository at this point in the history
  • Loading branch information
brianburton committed Feb 26, 2024
1 parent c505381 commit 9a83a5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ public static <T> T[] assignDelete(@Nonnull Allocator<T> allocator,
}

/**
* Returns a copy of orig containing of length limit containing all values from [0,limit).
* Returns a copy of orig of length limit containing all values from [0,limit).
*/
@Nonnull
public static <T> T[] prefix(@Nonnull Allocator<T> allocator,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ private MultiValueNode(T[] values)
{
assert count > 1;
assert count <= MAX_SIZE;
this.values = allocate(count);
System.arraycopy(values, 0, this.values, 0, count);
this.values = ArrayHelper.prefix(this, values, count);
}

/**
Expand Down

0 comments on commit 9a83a5f

Please sign in to comment.