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. 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!

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

    utACK b710aab38d01393412616d4a31fc4a4b3011e747

  5. MarcoFalke added the label Tests on Jun 3, 2018
  6. bench: Use non-throwing ParseDouble(...) instead of throwing boost::lexical_cast<double>(...) f41d339b78
  7. practicalswift force-pushed on Jun 3, 2018
  8. 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

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

  11. laanwj referenced this in commit 2722a1f8e9 on Jun 4, 2018
  12. laanwj referenced this in commit 7c7508c268 on Jun 5, 2018
  13. jasonbcox referenced this in commit cf2b6f7276 on Sep 27, 2019
  14. jonspock referenced this in commit 1349b2c577 on Dec 24, 2019
  15. jonspock referenced this in commit 7a19839b7c on Dec 24, 2019
  16. jonspock referenced this in commit a3ff051b64 on Dec 24, 2019
  17. jonspock referenced this in commit f9629e4d88 on Dec 24, 2019
  18. jonspock referenced this in commit 0f151cf6c2 on Dec 24, 2019
  19. jonspock referenced this in commit 9705a59f5f on Dec 26, 2019
  20. PastaPastaPasta referenced this in commit 3301b73c37 on Jun 17, 2020
  21. PastaPastaPasta referenced this in commit 9a9aa3f467 on Jul 2, 2020
  22. practicalswift deleted the branch on Apr 10, 2021
  23. UdjinM6 referenced this in commit 36d647f258 on Jun 19, 2021
  24. UdjinM6 referenced this in commit e8194c081b on Jun 24, 2021
  25. UdjinM6 referenced this in commit 14dc255a19 on Jun 26, 2021
  26. UdjinM6 referenced this in commit 866e39a1cd on Jun 26, 2021
  27. UdjinM6 referenced this in commit 7d9504a228 on Jun 28, 2021
  28. random-zebra referenced this in commit 0e757ad2c9 on Feb 9, 2022
  29. gades referenced this in commit 2dddfcabda on Feb 21, 2022
  30. gades referenced this in commit 33a91850a6 on May 1, 2022
  31. DrahtBot 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-04-16 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me