1
0
Fork 0
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:
Jonas Jenwald 2024-11-17 11:57:45 +01:00
parent 9bf9bbda0b
commit 8783dd0178

View file

@ -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);
}
});