Skip to content

Commit

Permalink
Replace dots only in the for-loop header.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexnick83 committed Sep 27, 2023
1 parent 6490b2f commit 2eda9da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dace/codegen/control_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,10 +391,10 @@ def as_cpp(self, codegen, symbols) -> str:
update = f'{self.itervar} = {self.update}'

expr = f'{preinit}\nfor ({init}; {cond}; {update}) {{\n'
expr += _clean_loop_body(self.body.as_cpp(codegen, symbols))
expr += '\n}\n'
# TODO: Check that the dot is used to access struct members
expr = expr.replace('.', '->')
expr += _clean_loop_body(self.body.as_cpp(codegen, symbols))
expr += '\n}\n'
return expr

@property
Expand Down

0 comments on commit 2eda9da

Please sign in to comment.