mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-23 08:38:06 +02:00
Avoid redundant CMap-value lookup in extendCMap
(PR 5101 follow-up)
When iterating through `useCMap` the value is already available, without having to manually invoke the `lookup`-method. While this will likely not affect performance in any noticeable way, it's nonetheless unnecessary to lookup an already available value twice.
This commit is contained in:
parent
9bf9bbda0b
commit
8783dd0178
1 changed files with 1 additions and 1 deletions
|
@ -662,7 +662,7 @@ async function extendCMap(cMap, fetchBuiltInCMap, useCMap) {
|
|||
// any previously defined entries.
|
||||
cMap.useCMap.forEach(function (key, value) {
|
||||
if (!cMap.contains(key)) {
|
||||
cMap.mapOne(key, cMap.useCMap.lookup(key));
|
||||
cMap.mapOne(key, value);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue