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
- Branch
- parsescriptrefac
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 2401 Build 2931: Bitcoin ABC Buildbot (legacy) Build 2930: arc lint + arc unit
Event Timeline
src/core_read.cpp | ||
---|---|---|
75 | 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 | 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. |