HomePhabricator

bench: Use non-throwing ParseDouble(...) instead of throwing boost…

Description

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

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

Reviewers: Fabien, #bitcoin_abc, deadalnix, nakihito

Reviewed By: #bitcoin_abc, deadalnix, nakihito

Differential Revision: https://reviews.bitcoinabc.org/D4080

Details

Provenance
fpelliccioniAuthored on Sep 13 2019, 20:53
fpelliccioniPushed on Sep 20 2019, 12:38
Reviewer
Restricted Project
Differential Revision
D4080: bench: Use non-throwing ParseDouble(...) instead of throwing boost::lexical_cast<double>(...)
Parents
rABC2ec61ddea958: [qt] send: Clear All also resets coin control options
Branches
Unknown
Tags
Unknown