forked from aws/aws-ofi-nccl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(tree): move declarations to top of function (aws#563)
c++ suppoorts initializers anywhere in the function, but one must not jump over an initializer with any goto usage. Given the lack of RAII in C, this becomes a significant painpoint. In large to-be-eventually-refactored functions contain gotos or use switch statements, split declaration and initialization, and move all declarations to the top of the function. This makes switch statements and gotos safe in both languages. Signed-off-by: Nicholas Sielicki <[email protected]>
- Loading branch information
1 parent
fb9216c
commit 34c49d9
Showing
6 changed files
with
109 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.