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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

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