[Pkg-javascript-commits] [pdf.js] 94/246: Use strict equalities in src/core/image.js

David Prévot taffit at moszumanska.debian.org
Sun Sep 7 15:36:29 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository pdf.js.

commit 160c7cab33af7cc913d243a8dec4aead27850f47
Author: Tim van der Meij <timvandermeij at gmail.com>
Date:   Fri Aug 1 22:40:47 2014 +0200

    Use strict equalities in src/core/image.js
---
 src/core/image.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/core/image.js b/src/core/image.js
index e14e204..fbcce33 100644
--- a/src/core/image.js
+++ b/src/core/image.js
@@ -258,7 +258,7 @@ var PDFImage = (function PDFImageClosure() {
 
     var computedLength = ((width + 7) >> 3) * height;
     var actualLength = imgArray.byteLength;
-    var haveFullData = computedLength == actualLength;
+    var haveFullData = computedLength === actualLength;
     var data, i;
 
     if (imageIsFromDecodeStream && (!inverseDecode || haveFullData)) {
@@ -416,7 +416,7 @@ var PDFImage = (function PDFImageClosure() {
         sh = smask.height;
         alphaBuf = new Uint8Array(sw * sh);
         smask.fillGrayBuffer(alphaBuf);
-        if (sw != width || sh != height) {
+        if (sw !== width || sh !== height) {
           alphaBuf = PDFImage.resize(alphaBuf, smask.bpc, 1, sw, sh, width,
                                      height);
         }
@@ -433,7 +433,7 @@ var PDFImage = (function PDFImageClosure() {
             alphaBuf[i] = 255 - alphaBuf[i];
           }
 
-          if (sw != width || sh != height) {
+          if (sw !== width || sh !== height) {
             alphaBuf = PDFImage.resize(alphaBuf, mask.bpc, 1, sw, sh, width,
                                        height);
           }
@@ -602,7 +602,7 @@ var PDFImage = (function PDFImageClosure() {
 
     fillGrayBuffer: function PDFImage_fillGrayBuffer(buffer) {
       var numComps = this.numComps;
-      if (numComps != 1) {
+      if (numComps !== 1) {
         error('Reading gray scale from a color image: ' + numComps);
       }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git



More information about the Pkg-javascript-commits mailing list