remove skipChar(), use skip() without an argument instead

This commit is contained in:
Andreas Gal 2011-05-09 23:44:25 -07:00
parent 2a60352e24
commit da1532e0d8

10
pdf.js
View File

@ -39,12 +39,10 @@ var Stream = (function() {
this.pos++; this.pos++;
return ch; return ch;
}, },
skipChar: function() {
this.pos++;
},
skip: function(n) { skip: function(n) {
while (n-- > 0) if (!n)
this.skipChar(); n = 1;
this.pos += n;
}, },
moveStart: function() { moveStart: function() {
this.start = this.pos; this.start = this.pos;
@ -1119,7 +1117,7 @@ var Parser = (function() {
this.inlineImg = 0; this.inlineImg = 0;
} }
} else if (IsCmd(this.buf2, "ID")) { } 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.inlineImg = 1;
} }
this.buf1 = this.buf2; this.buf1 = this.buf2;