removed use of pointer to iterators, spurious function calls and made the function noexcept
Details
Details
- Reviewers
deadalnix - Group Reviewers
Restricted Owners Package (Owns No Changed Paths) Restricted Project
wrote a local cpp test testing many possible hex strings including the "" and "0x" edge cases to make sure function behaves appropriately.
also forced substr to throw out_of_range - substr(-1,x) - and made sure it is caught so the 'noexcept' isn't a lie
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- refactor-util-strencodings
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 8284 Build 14593: Default Diff Build & Tests Build 14592: arc lint + arc unit
Event Timeline
Comment Actions
While the change isn't bad per se, this is actually not helping. This code is maintained today by the Core developers and taking ownership of it just increase our maintenance burden. Without a direct benefit, this is hard to justify.
src/util/strencodings.cpp | ||
---|---|---|
73 ↗ | (On Diff #14416) | As an aside, this may allocate memory - though most stdlib will do SSO in practice for 2 chars. Allocating when you can avoid is usually a pretty bad idea. |