[varLib.interpolatable] One other micro-optimization
Residual from 4714c37028f462b29159ef7f7186e51ef68c20e1
This commit is contained in:
parent
872ae47536
commit
1d0a180b9d
@ -349,11 +349,12 @@ def test(glyphsets, glyphs=None, names=None, ignore_missing=False):
|
|||||||
break
|
break
|
||||||
|
|
||||||
# m0idx should be the index of the first non-None item in allContourIsomorphisms,
|
# m0idx should be the index of the first non-None item in allContourIsomorphisms,
|
||||||
# else give it the first index of None, which is likely 0
|
# else give it the last item.
|
||||||
m0idx = allContourIsomorphisms.index(
|
m0idx = next(
|
||||||
next((x for x in allContourIsomorphisms if x is not None), None)
|
(i for i, x in enumerate(allContourIsomorphisms) if x is not None),
|
||||||
|
len(allVectors) - 1,
|
||||||
)
|
)
|
||||||
# m0 is the first non-None item in allContourIsomorphisms, or the first item if all are None
|
# m0 is the first non-None item in allContourIsomorphisms, or last one if all None
|
||||||
m0 = allContourIsomorphisms[m0idx]
|
m0 = allContourIsomorphisms[m0idx]
|
||||||
if m0:
|
if m0:
|
||||||
for i, m1 in enumerate(allContourIsomorphisms[m0idx + 1 :]):
|
for i, m1 in enumerate(allContourIsomorphisms[m0idx + 1 :]):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user