]> git.parisson.com Git - pdf.js.git/commitdiff
remove skipChar(), use skip() without an argument instead
authorAndreas Gal <andreas.gal@gmail.com>
Tue, 10 May 2011 06:44:25 +0000 (23:44 -0700)
committerAndreas Gal <andreas.gal@gmail.com>
Tue, 10 May 2011 06:44:25 +0000 (23:44 -0700)
pdf.js

diff --git a/pdf.js b/pdf.js
index bce53c8a9cc8d7f79330c0677dcf04caaced6d95..60b19d887ccc72d71cc0fea48423b804a879f67e 100644 (file)
--- a/pdf.js
+++ b/pdf.js
@@ -39,12 +39,10 @@ var Stream = (function() {
             this.pos++;
             return ch;
         },
-        skipChar: function() {
-            this.pos++;
-        },
         skip: function(n) {
-            while (n-- > 0)
-                this.skipChar();
+            if (!n)
+                n = 1;
+            this.pos += n;
         },
         moveStart: function() {
             this.start = this.pos;
@@ -1119,7 +1117,7 @@ var Parser = (function() {
                     this.inlineImg = 0;
                 }
             } else if (IsCmd(this.buf2, "ID")) {
-                this.lexer.skipChar();         // skip char after 'ID' command
+                this.lexer.skip(); // skip char after 'ID' command
                 this.inlineImg = 1;
             }
             this.buf1 = this.buf2;