Skip to content

Commit

Permalink
Merge pull request #14911 from Snuffleupagus/more-TypedArray-fill
Browse files Browse the repository at this point in the history
Use `TypedArray.prototype.fill()` a bit more in the code-base
  • Loading branch information
Snuffleupagus authored May 13, 2022
2 parents fbc7981 + d540df0 commit 96b125f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/core/jbig2.js
Original file line number Diff line number Diff line change
Expand Up @@ -1558,9 +1558,7 @@ class SimpleSegmentVisitor {
// The contents of ArrayBuffers are initialized to 0.
// Fill the buffer with 0xFF only if info.defaultPixelValue is set
if (info.defaultPixelValue) {
for (let i = 0, ii = buffer.length; i < ii; i++) {
buffer[i] = 0xff;
}
buffer.fill(0xff);
}
this.buffer = buffer;
}
Expand Down

0 comments on commit 96b125f

Please sign in to comment.