Skip to content

Commit

Permalink
Fix the remaining ESLint operator-assignment errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Snuffleupagus committed Jul 4, 2021
1 parent 901b24e commit 819be0e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions external/cmapscompress/compress.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ function parseCMap(binaryData) {
bufferSize = 0;
while (s.length < lengthInChars) {
while (bufferSize < 4 && stack.length > 0) {
buffer = (stack.pop() << bufferSize) | buffer;
buffer |= stack.pop() << bufferSize;
bufferSize += 7;
}
s = toHexDigit(buffer & 15) + s;
Expand Down Expand Up @@ -375,7 +375,7 @@ function writeNumber(n) {
let i = n.length;
while (i > 0) {
--i;
buffer = (fromHexDigit(n[i]) << bufferSize) | buffer;
buffer |= fromHexDigit(n[i]) << bufferSize;
bufferSize += 4;
if (bufferSize >= 7) {
s = writeByte((buffer & 0x7f) | (s.length > 0 ? 0x80 : 0)) + s;
Expand Down
2 changes: 1 addition & 1 deletion src/core/ascii_85_stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Ascii85Stream extends DecodeStream {
// Most streams increase in size when decoded, but Ascii85 streams
// typically shrink by ~20%.
if (maybeLength) {
maybeLength = 0.8 * maybeLength;
maybeLength *= 0.8;
}
super(maybeLength);

Expand Down
2 changes: 1 addition & 1 deletion src/core/ascii_hex_stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class AsciiHexStream extends DecodeStream {
// Most streams increase in size when decoded, but AsciiHex streams shrink
// by 50%.
if (maybeLength) {
maybeLength = 0.5 * maybeLength;
maybeLength *= 0.5;
}
super(maybeLength);

Expand Down
2 changes: 1 addition & 1 deletion src/core/cmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ const BinaryCMapReader = (function BinaryCMapReaderClosure() {
bufferSize = 0;
while (i >= 0) {
while (bufferSize < 8 && stack.length > 0) {
buffer = (stack[--sp] << bufferSize) | buffer;
buffer |= stack[--sp] << bufferSize;
bufferSize += 7;
}
num[i] = buffer & 255;
Expand Down
2 changes: 1 addition & 1 deletion src/core/jbig2.js
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,7 @@ function decodeHalftoneRegion(
bit = 0;
patternIndex = 0;
for (j = bitsPerValue - 1; j >= 0; j--) {
bit = grayScaleBitPlanes[j][mg][ng] ^ bit; // Gray decoding
bit ^= grayScaleBitPlanes[j][mg][ng]; // Gray decoding
patternIndex |= bit << j;
}
patternBitmap = patterns[patternIndex];
Expand Down

0 comments on commit 819be0e

Please sign in to comment.