mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Enable the no-unused-vars
ESLint rule
Please see http://eslint.org/docs/rules/no-unused-vars; note that this patch purposely uses the same rule options as in `mozilla-central`, such that it fixes part of issue 7957. It wasn't, in my opinion, entirely straightforward to enable this rule compared to the already existing rules. In many cases a `var descriptiveName = ...` format was used (more or less) to document the code, and I choose to place the old variable name in a trailing comment to not lose that information. I welcome feedback on these changes, since it wasn't always entirely easy to know what changes made the most sense in every situation.
This commit is contained in:
parent
8d684b5b3f
commit
52e0f51917
23 changed files with 37 additions and 85 deletions
|
@ -594,9 +594,6 @@ var Font = (function FontClosure() {
|
|||
|
||||
this.glyphCache = Object.create(null);
|
||||
|
||||
var names = name.split('+');
|
||||
names = names.length > 1 ? names[1] : names[0];
|
||||
names = names.split(/[-,_]/g)[0];
|
||||
this.isSerifFont = !!(properties.flags & FontFlags.Serif);
|
||||
this.isSymbolicFont = !!(properties.flags & FontFlags.Symbolic);
|
||||
this.isMonospace = !!(properties.flags & FontFlags.FixedPitch);
|
||||
|
@ -1409,7 +1406,7 @@ var Font = (function FontClosure() {
|
|||
var start = (font.start ? font.start : 0) + cmap.offset;
|
||||
font.pos = start;
|
||||
|
||||
var version = font.getUint16();
|
||||
font.getUint16(); // version
|
||||
var numTables = font.getUint16();
|
||||
|
||||
var potentialTable;
|
||||
|
@ -1471,8 +1468,8 @@ var Font = (function FontClosure() {
|
|||
}
|
||||
|
||||
var format = font.getUint16();
|
||||
var length = font.getUint16();
|
||||
var language = font.getUint16();
|
||||
font.getUint16(); // length
|
||||
font.getUint16(); // language
|
||||
|
||||
var hasShortCmap = false;
|
||||
var mappings = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue