Skip to content

Commit

Permalink
[varLib.optimize] Minor more idiomatic
Browse files Browse the repository at this point in the history
  • Loading branch information
behdad committed May 25, 2023
1 parent dbc91b1 commit f5e62a1
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Lib/fontTools/varLib/varStore.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,10 +588,8 @@ def VarStore_optimize(self, use_NO_VARIATION_INDEX=True, quantization=1):
if todo[i] is None or todo[j] is None:
continue

encoding = todo[i]
other_encoding = todo[j]
todo[i] = None
todo[j] = None
encoding, other_encoding = todo[i], todo[j]
todo[i], todo[j] = None, None

# Combine the two encodings
combined_chars = other_encoding.chars | encoding.chars
Expand All @@ -600,7 +598,6 @@ def VarStore_optimize(self, use_NO_VARIATION_INDEX=True, quantization=1):
combined_encoding.extend(other_encoding.items)

for k, enc in enumerate(todo):

if enc is None:
continue

Expand Down

0 comments on commit f5e62a1

Please sign in to comment.