MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / getNextValueElement

Method getNextValueElement

addons/misra_9.py:98–112  ·  view source on GitHub ↗
(self, root)

Source from the content-addressed store, hash-verified

96 return None
97
98 def getNextValueElement(self, root):
99 current = self
100 while current != root:
101 if not current.parent:
102 return None
103 # Get next index of parent
104 i = current.parent.children.index(current) + 1
105 # Next index of parent exists
106 if i < len(current.parent.children):
107 current = current.parent.children[i]
108 return current.getFirstValueElement()
109
110 # Next index of parent doesn't exist. Move up
111 current = current.parent
112 return None
113
114 def getFirstValueElement(self):
115 current = self

Callers 1

unwindAndContinueMethod · 0.80

Calls 1

getFirstValueElementMethod · 0.80

Tested by

no test coverage detected