mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58: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
|
@ -53,9 +53,9 @@ var FontRendererFactory = (function FontRendererFactoryClosure() {
|
|||
var offset = (getUshort(data, start + 2) === 1 ?
|
||||
getLong(data, start + 8) : getLong(data, start + 16));
|
||||
var format = getUshort(data, start + offset);
|
||||
var length, ranges, p, i;
|
||||
var ranges, p, i;
|
||||
if (format === 4) {
|
||||
length = getUshort(data, start + offset + 2);
|
||||
getUshort(data, start + offset + 2); // length
|
||||
var segCount = getUshort(data, start + offset + 6) >> 1;
|
||||
p = start + offset + 14;
|
||||
ranges = [];
|
||||
|
@ -82,7 +82,7 @@ var FontRendererFactory = (function FontRendererFactoryClosure() {
|
|||
}
|
||||
return ranges;
|
||||
} else if (format === 12) {
|
||||
length = getLong(data, start + offset + 4);
|
||||
getLong(data, start + offset + 4); // length
|
||||
var groups = getLong(data, start + offset + 12);
|
||||
p = start + offset + 16;
|
||||
ranges = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue