Addons: Variable.constness will never be None

This commit is contained in:
Daniel Marjamäki 2022-03-19 10:36:46 +01:00
parent 297b0b5c60
commit 7728c53cb9
1 changed files with 5 additions and 3 deletions

View File

@ -620,9 +620,11 @@ class Variable:
self.isPointer = element.get('isPointer') == 'true'
self.isReference = element.get('isReference') == 'true'
self.isStatic = element.get('isStatic') == 'true'
self.constness = element.get('constness')
if self.constness:
self.constness = int(self.constness)
constness = element.get('constness')
if constness:
self.constness = int(constness)
else:
self.constness = 0
def __repr__(self):
attrs = ["Id", "nameTokenId", "typeStartTokenId", "typeEndTokenId",