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
@ -662,7 +662,7 @@ async function extendCMap(cMap, fetchBuiltInCMap, useCMap) {
|
|||||||
// any previously defined entries.
|
// any previously defined entries.
|
||||||
cMap.useCMap.forEach(function (key, value) {
|
cMap.useCMap.forEach(function (key, value) {
|
||||||
if (!cMap.contains(key)) {
|
if (!cMap.contains(key)) {
|
||||||
cMap.mapOne(key, cMap.useCMap.lookup(key));
|
cMap.mapOne(key, value);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user