From: Andreas Gal Date: Tue, 10 May 2011 06:44:25 +0000 (-0700) Subject: remove skipChar(), use skip() without an argument instead X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=da1532e0d8cbde276f9ded16b045d97902b10f95;p=pdf.js.git remove skipChar(), use skip() without an argument instead --- diff --git a/pdf.js b/pdf.js index bce53c8..60b19d8 100644 --- 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;