mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Merge pull request #1382 from kkujala/master
Use [] instead of new Array(...).
This commit is contained in:
commit
32eb64389e
4 changed files with 9 additions and 13 deletions
|
@ -3703,7 +3703,7 @@ var CFFParser = (function CFFParserClosure() {
|
|||
var name = index.get(i);
|
||||
// OTS doesn't allow names to be over 127 characters.
|
||||
var length = Math.min(name.length, 127);
|
||||
var data = new Array(length);
|
||||
var data = [];
|
||||
// OTS also only permits certain characters in the name.
|
||||
for (var j = 0; j < length; ++j) {
|
||||
var c = name[j];
|
||||
|
@ -4553,7 +4553,7 @@ var CFFCompiler = (function CFFCompilerClosure() {
|
|||
return this.compileTypedArray(fdSelect);
|
||||
},
|
||||
compileTypedArray: function compileTypedArray(data) {
|
||||
var out = new Array(data.length);
|
||||
var out = [];
|
||||
for (var i = 0, ii = data.length; i < ii; ++i)
|
||||
out[i] = data[i];
|
||||
return out;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue