]> git.proxmox.com Git - mirror_novnc.git/commitdiff
Remove unused inflate argument
authorNiko Lehto <nikle@cendio.se>
Mon, 3 Feb 2020 08:53:30 +0000 (09:53 +0100)
committerNiko Lehto <nikle@cendio.se>
Mon, 17 Feb 2020 10:29:40 +0000 (11:29 +0100)
The value true was an invalid flush argument so it was in practice
unused.

core/decoders/tight.js
core/inflator.js

index 7695d447b16a583668310f7c62fd53b028efd11d..5a0a315f82e0a39e707f96330b8f92227ed0d285 100644 (file)
@@ -160,7 +160,7 @@ export default class TightDecoder {
                 return false;
             }
 
-            data = this._zlibs[streamId].inflate(data, true, uncompressedSize);
+            data = this._zlibs[streamId].inflate(data, uncompressedSize);
             if (data.length != uncompressedSize) {
                 throw new Error("Incomplete zlib block");
             }
@@ -208,7 +208,7 @@ export default class TightDecoder {
                 return false;
             }
 
-            data = this._zlibs[streamId].inflate(data, true, uncompressedSize);
+            data = this._zlibs[streamId].inflate(data, uncompressedSize);
             if (data.length != uncompressedSize) {
                 throw new Error("Incomplete zlib block");
             }
index 0eab8fe48c2ced5a00c07c098f22681d95dd8093..fe9f8c7d53e95cf85eef06c8de6c7b0d0d52e463 100644 (file)
@@ -11,7 +11,7 @@ export default class Inflate {
         inflateInit(this.strm, this.windowBits);
     }
 
-    inflate(data, flush, expected) {
+    inflate(data, expected) {
         this.strm.input = data;
         this.strm.avail_in = this.strm.input.length;
         this.strm.next_in = 0;
@@ -27,7 +27,7 @@ export default class Inflate {
 
         this.strm.avail_out = this.chunkSize;
 
-        inflate(this.strm, flush);
+        inflate(this.strm, 0); // Flush argument not used.
 
         return new Uint8Array(this.strm.output.buffer, 0, this.strm.next_out);
     }