remove unnecessary if statement (#18792)
This commit is contained in:
parent
06ff0e9624
commit
905fae51f6
1 changed files with 6 additions and 6 deletions
|
|
@ -434,12 +434,12 @@ proc transformYield(c: PTransf, n: PNode): PNode =
|
||||||
else:
|
else:
|
||||||
# we need to introduce new local variables:
|
# we need to introduce new local variables:
|
||||||
result.add(introduceNewLocalVars(c, c.transCon.forLoopBody))
|
result.add(introduceNewLocalVars(c, c.transCon.forLoopBody))
|
||||||
if result.len > 0:
|
|
||||||
for idx in 0 ..< result.len:
|
for idx in 0 ..< result.len:
|
||||||
var changeNode = result[idx]
|
var changeNode = result[idx]
|
||||||
changeNode.info = c.transCon.forStmt.info
|
changeNode.info = c.transCon.forStmt.info
|
||||||
for i, child in changeNode:
|
for i, child in changeNode:
|
||||||
child.info = changeNode.info
|
child.info = changeNode.info
|
||||||
|
|
||||||
proc transformAddrDeref(c: PTransf, n: PNode, a, b: TNodeKind): PNode =
|
proc transformAddrDeref(c: PTransf, n: PNode, a, b: TNodeKind): PNode =
|
||||||
result = transformSons(c, n)
|
result = transformSons(c, n)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue