Page MenuHomePhabricator

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

Authored by nakihito on Sep 18 2019, 21:10.

Details

Reviewers
deadalnix
Fabien
jasonbcox
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Summary

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

Pull request description:

  • 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 :-)

Tree-SHA512: a8cf04a5f8363cb7ced0bcaf1fed00e1e5dd6a63a6c11e5f0ba4e5c845b0df7c2b050d887075f158cd62dc7e02843ecaafc15e42e383c066461c6d7399e06b49

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

Test Plan
make check
bench/bench_bitcoin

Diff Detail

Repository
rABC Bitcoin ABC
Branch
PR13383
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 7504
Build 13051: Bitcoin ABC Buildbot (legacy)
Build 13050: arc lint + arc unit