This is extracted from D1295 . Refactoring the control flow and adding more logic make it fairly hard to review so this makes for a nice first step.
Details
Details
- Reviewers
jasonbcox schancel - Group Reviewers
Restricted Project - Commits
- rSTAGINGe53945b71bda: Refactor ParseScript to deduplicate error checking.
rABCe53945b71bda: Refactor ParseScript to deduplicate error checking.
make check
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
src/core_read.cpp | ||
---|---|---|
75 ↗ | (On Diff #3626) | Goto's give a bad code smell, generally. This implementation looks clean, but we'll have to be vigilant in keeping it that way. If I was writing this, I would encapsulate the error message code in a function and call that here, followed by a continue; |
src/core_read.cpp | ||
---|---|---|
75 ↗ | (On Diff #3626) | We need to run some code after each iteration of the loop. C++ just doesn't provide a good way to do this. D's scope(success) would be great, but we don't have this. |