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

pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:remove-dependency-on-lexical_cast-which-is-boost-and-also-throws changing 1 files +8 −6
  1. practicalswift commented at 6:12 PM on June 3, 2018: contributor
    • 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 :-)
  2. practicalswift cross-referenced this on Jun 3, 2018 from issue build: Guard against accidental introduction of new Boost dependencies by practicalswift
  3. in src/bench/bench_bitcoin.cpp:11 in b710aab38d outdated
       8 | @@ -9,8 +9,7 @@
       9 |  #include <validation.h>
      10 |  #include <util.h>
      11 |  #include <random.h>
      12 | -
      13 | -#include <boost/lexical_cast.hpp>
      14 | +#include <utilstrencodings.h>
    


    MarcoFalke commented at 7:00 PM on June 3, 2018:

    nit: Can run the clang format diff script to sort includes


    practicalswift commented at 7:30 PM on June 3, 2018:

    Thanks! Fixed!

  4. MarcoFalke approved
  5. MarcoFalke commented at 7:00 PM on June 3, 2018: member

    utACK b710aab38d01393412616d4a31fc4a4b3011e747

  6. MarcoFalke added the label Tests on Jun 3, 2018
  7. bench: Use non-throwing ParseDouble(...) instead of throwing boost::lexical_cast<double>(...) f41d339b78
  8. practicalswift force-pushed on Jun 3, 2018
  9. laanwj commented at 6:47 AM on June 4, 2018: member

    How tf did boost::lexical_cast sneak into our codebase again?!?

    Thank you for noticing, and using the function that was created for that purpose.

    utACK f41d339b781f41f05946e965da3e1bf5d0a9e50b

  10. laanwj merged this on Jun 4, 2018
  11. laanwj closed this on Jun 4, 2018

  12. laanwj referenced this in commit 2722a1f8e9 on Jun 4, 2018
  13. laanwj referenced this in commit 7c7508c268 on Jun 5, 2018
  14. Bushstar cross-referenced this on Jun 6, 2018 from issue commits from bitcoin/master by Bushstar
  15. jasonbcox referenced this in commit cf2b6f7276 on Sep 27, 2019
  16. jonspock referenced this in commit 1349b2c577 on Dec 24, 2019
  17. jonspock referenced this in commit 7a19839b7c on Dec 24, 2019
  18. jonspock referenced this in commit a3ff051b64 on Dec 24, 2019
  19. jonspock referenced this in commit f9629e4d88 on Dec 24, 2019
  20. jonspock referenced this in commit 0f151cf6c2 on Dec 24, 2019
  21. jonspock referenced this in commit 9705a59f5f on Dec 26, 2019
  22. PastaPastaPasta referenced this in commit 3301b73c37 on Jun 17, 2020
  23. PastaPastaPasta referenced this in commit 9a9aa3f467 on Jul 2, 2020
  24. practicalswift deleted the branch on Apr 10, 2021
  25. UdjinM6 referenced this in commit 36d647f258 on Jun 19, 2021
  26. UdjinM6 referenced this in commit e8194c081b on Jun 24, 2021
  27. UdjinM6 referenced this in commit 14dc255a19 on Jun 26, 2021
  28. UdjinM6 referenced this in commit 866e39a1cd on Jun 26, 2021
  29. UdjinM6 referenced this in commit 7d9504a228 on Jun 28, 2021
  30. Fuzzbawls cross-referenced this on Feb 7, 2022 from issue [Lint] Introduce lint-includes.sh script by Fuzzbawls
  31. random-zebra referenced this in commit 0e757ad2c9 on Feb 9, 2022
  32. gades referenced this in commit 2dddfcabda on Feb 21, 2022
  33. gades referenced this in commit 33a91850a6 on May 1, 2022
  34. bitcoin locked this on Aug 18, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-20 06:55 UTC