Fix the remaining ESLint operator-assignment errors

This commit is contained in:
Jonas Jenwald 2021-07-04 11:55:33 +02:00
parent 901b24e8af
commit 819be0e78b
5 changed files with 6 additions and 6 deletions

View File

@ -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;
@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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;

View File

@ -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];