Merge pull request #1932 from simoncozens/pscharstring-repeated-init

[misc.psCharStrings] Use inheritance to avoid repeated code in initializer
This commit is contained in:
Cosimo Lupo 2020-05-11 11:15:54 +01:00 committed by GitHub
commit b81d13952a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1150,10 +1150,7 @@ class T1CharString(T2CharString):
operators, opcodes = buildOperatorDict(t1Operators) operators, opcodes = buildOperatorDict(t1Operators)
def __init__(self, bytecode=None, program=None, subrs=None): def __init__(self, bytecode=None, program=None, subrs=None):
if program is None: super().__init__(bytecode, program)
program = []
self.bytecode = bytecode
self.program = program
self.subrs = subrs self.subrs = subrs
def getIntEncoder(self): def getIntEncoder(self):