cppcheckdata.py: fixed Value::tokvalue
This commit is contained in:
parent
7199dde161
commit
ec301b2447
|
@ -383,6 +383,7 @@ class Token:
|
||||||
self.impossible_values.append(v)
|
self.impossible_values.append(v)
|
||||||
else:
|
else:
|
||||||
self.values.append(v)
|
self.values.append(v)
|
||||||
|
v.setId(IdMap)
|
||||||
self.typeScope = IdMap[self.typeScopeId]
|
self.typeScope = IdMap[self.typeScopeId]
|
||||||
self.astParent = IdMap[self.astParentId]
|
self.astParent = IdMap[self.astParentId]
|
||||||
self.astOperand1 = IdMap[self.astOperand1Id]
|
self.astOperand1 = IdMap[self.astOperand1Id]
|
||||||
|
@ -688,7 +689,7 @@ class Value:
|
||||||
self.intvalue = element.get('intvalue')
|
self.intvalue = element.get('intvalue')
|
||||||
if self.intvalue:
|
if self.intvalue:
|
||||||
self.intvalue = int(self.intvalue)
|
self.intvalue = int(self.intvalue)
|
||||||
self.tokvalue = element.get('tokvalue')
|
self._tokvalueId = element.get('tokvalue')
|
||||||
self.floatvalue = element.get('floatvalue')
|
self.floatvalue = element.get('floatvalue')
|
||||||
self.containerSize = element.get('container-size')
|
self.containerSize = element.get('container-size')
|
||||||
self.condition = element.get('condition-line')
|
self.condition = element.get('condition-line')
|
||||||
|
@ -703,6 +704,9 @@ class Value:
|
||||||
if element.get('inconclusive'):
|
if element.get('inconclusive'):
|
||||||
self.inconclusive = True
|
self.inconclusive = True
|
||||||
|
|
||||||
|
def setId(self, IdMap):
|
||||||
|
self.tokvalue = IdMap.get(self._tokvalueId)
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
attrs = ["intvalue", "tokvalue", "floatvalue", "containerSize",
|
attrs = ["intvalue", "tokvalue", "floatvalue", "containerSize",
|
||||||
"condition", "valueKind", "inconclusive"]
|
"condition", "valueKind", "inconclusive"]
|
||||||
|
|
Loading…
Reference in New Issue