Page MenuHomePhabricator

bench: Use non-throwing ParseDouble(...) instead of throwing boost::lexical_cast<double>(...)
ClosedPublic

Authored by fpelliccioni on Sep 13 2019, 22:29.

Details

Summary
  • Non-Boost is better than Boost.
  • Non-throwing is better than throwing.
  • Explicit error handling is better than implicit error handling.
  • ParseDouble(…) deserves to be used outside of its unit tests :-)

Backport of Bitcoin Core PR13383
https://github.com/bitcoin/bitcoin/pull/13383

Test Plan
make check-all

Diff Detail

Repository
rABC Bitcoin ABC
Branch
feature-backport-2722a1f8e
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 7456
Build 12955: Bitcoin ABC Buildbot (legacy)
Build 12954: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Sep 14 2019, 07:49