[Pkg-javascript-commits] [pdf.js] 76/246: Add strict equalities in src/core/colorspace.js

David Prévot taffit at moszumanska.debian.org
Sun Sep 7 15:36:27 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 0012b8803c3f9871d74b6d8d286def608d067fb5
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Fri Aug 1 18:25:58 2014 +0200

    Add strict equalities in src/core/colorspace.js
---
 src/core/colorspace.js | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/core/colorspace.js b/src/core/colorspace.js
index 7f01840..0f1dc36 100644
--- a/src/core/colorspace.js
+++ b/src/core/colorspace.js
@@ -84,7 +84,7 @@ var ColorSpace = (function ColorSpaceClosure() {
       var count = originalWidth * originalHeight;
       var rgbBuf = null;
       var numComponentColors = 1 << bpc;
-      var needsResizing = originalHeight != height || originalWidth != width;
+      var needsResizing = originalHeight !== height || originalWidth !== width;
       var i, ii;
 
       if (this.isPassthrough(bpc)) {
@@ -277,11 +277,11 @@ var ColorSpace = (function ColorSpaceClosure() {
           var stream = xref.fetchIfRef(cs[1]);
           var dict = stream.dict;
           numComps = dict.get('N');
-          if (numComps == 1) {
+          if (numComps === 1) {
             return 'DeviceGrayCS';
-          } else if (numComps == 3) {
+          } else if (numComps === 3) {
             return 'DeviceRgbCS';
-          } else if (numComps == 4) {
+          } else if (numComps === 4) {
             return 'DeviceCmykCS';
           }
           break;
@@ -342,7 +342,7 @@ var ColorSpace = (function ColorSpaceClosure() {
       return true;
     }
     for (var i = 0, ii = decode.length; i < ii; i += 2) {
-      if (decode[i] !== 0 || decode[i + 1] != 1) {
+      if (decode[i] !== 0 || decode[i + 1] !== 1) {
         return false;
       }
     }
@@ -607,7 +607,7 @@ var DeviceRgbCS = (function DeviceRgbCSClosure() {
       return (inputLength * (3 + alpha01) / 3) | 0;
     },
     isPassthrough: function DeviceRgbCS_isPassthrough(bits) {
-      return bits == 8;
+      return bits === 8;
     },
     fillRgb: ColorSpace.prototype.fillRgb,
     isDefaultDecode: function DeviceRgbCS_isDefaultDecode(decodeMap) {

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