bench: Use non-throwing ParseDouble(...) instead of throwing boost::lexical_cast<double>(...)#13383
Merged
laanwj merged 1 commit intobitcoin:masterfrom Jun 4, 2018
Conversation
maflcko
approved these changes
Jun 3, 2018
Member
maflcko
left a comment
There was a problem hiding this comment.
utACK b710aab38d01393412616d4a31fc4a4b3011e747
src/bench/bench_bitcoin.cpp
Outdated
Member
There was a problem hiding this comment.
nit: Can run the clang format diff script to sort includes
Contributor
Author
There was a problem hiding this comment.
Thanks! Fixed!
…exical_cast<double>(...)
b710aab to
f41d339
Compare
Member
|
How tf did Thank you for noticing, and using the function that was created for that purpose. utACK f41d339 |
laanwj
added a commit
that referenced
this pull request
Jun 4, 2018
…owing boost::lexical_cast<double>(...) f41d339 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
laanwj
added a commit
that referenced
this pull request
Jun 5, 2018
…st dependencies 81bbd32 build: Guard against accidental introduction of new Boost dependencies (practicalswift) Pull request description: Guard against accidental introduction of new Boost dependencies. Context: #13383 – the usage of `boost::lexical_cast` was introduced in #11517 from December 2017 Tree-SHA512: 8d7b667ecf7ea62d84d9d41a71726f1e46c5a411b5a7db475c973ef364cac65609399afda7931e143a27d40c2947ff286e5e98ab263e8f0d225e2ae2c0872935
jasonbcox
pushed a commit
to Bitcoin-ABC/bitcoin-abc
that referenced
this pull request
Sep 27, 2019
…exical_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 bitcoin/bitcoin#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
jonspock
pushed a commit
to jonspock/devault
that referenced
this pull request
Dec 24, 2019
…exical_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 bitcoin/bitcoin#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
jonspock
pushed a commit
to jonspock/devault
that referenced
this pull request
Dec 24, 2019
…exical_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 bitcoin/bitcoin#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
jonspock
pushed a commit
to jonspock/devault
that referenced
this pull request
Dec 24, 2019
…exical_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 bitcoin/bitcoin#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
jonspock
pushed a commit
to jonspock/devault
that referenced
this pull request
Dec 24, 2019
…exical_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 bitcoin/bitcoin#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
jonspock
pushed a commit
to jonspock/devault
that referenced
this pull request
Dec 24, 2019
…exical_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 bitcoin/bitcoin#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
jonspock
pushed a commit
to devaultcrypto/devault
that referenced
this pull request
Dec 26, 2019
…exical_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 bitcoin/bitcoin#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
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Jul 2, 2020
…new Boost dependencies 81bbd32 build: Guard against accidental introduction of new Boost dependencies (practicalswift) Pull request description: Guard against accidental introduction of new Boost dependencies. Context: bitcoin#13383 – the usage of `boost::lexical_cast` was introduced in bitcoin#11517 from December 2017 Tree-SHA512: 8d7b667ecf7ea62d84d9d41a71726f1e46c5a411b5a7db475c973ef364cac65609399afda7931e143a27d40c2947ff286e5e98ab263e8f0d225e2ae2c0872935
UdjinM6
pushed a commit
to UdjinM6/dash
that referenced
this pull request
Jun 28, 2021
… of throwing boost::lexical_cast<double>(...) f41d339 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
random-zebra
added a commit
to PIVX-Project/PIVX
that referenced
this pull request
Feb 9, 2022
ad5717d Lint: Add lint-includes.sh (Fuzzbawls) faba3f6 [tests] Use FastRandomContext in scheduler_tests.cpp (practicalswift) 2034bf6 Remove unused boost includes in reverselock_tests.cpp (Fuzzbawls) 3256d16 bench: Use non-throwing ParseDouble() (Fuzzbawls) 3c984d1 Remove duplicate includes (Fuzzbawls) b54e396 Declare TorReply parsing functions in torcontrol_tests (Fuzzbawls) Pull request description: This brings in the `lint-includes.sh` shell script from upstream (first introduced in bitcoin#11878) to automatically check for duplicate includes and expanded in bitcoin#13301 and bitcoin#13385 to check for the inclusion of `.cpp` files and the introduction of new boost includes, respectively. The check for enforcing bracket include syntax (bitcoin#13230) is also included, but currently disabled, as we have yet to systematically switch to that syntax preference. Three other upstream PRs are backported here as they are directly related to the removal of some boost dependencies and are very straight forward: - bitcoin#10547 - bitcoin#13291 - bitcoin#13383 **NOTE: #2711 removes the dependency on `boost/tuple/tuple.hpp`, so it makes sense to merge that first. submitting this now so the general concept/functionality can be reviewed prior to that PR being merged** ACKs for top commit: furszy: good ACK ad5717d random-zebra: utACK ad5717d and merging... Tree-SHA512: d9d32d6d5122dac52c9601cda75612d87c4e027c6f196a2382206b227fcfd2bb61d4f72df7cbf5e572d94150ad8ca6db6301bd99b0da647b9627fe342b66873f
gades
pushed a commit
to cosanta/cosanta-core
that referenced
this pull request
Feb 21, 2022
…new Boost dependencies 81bbd32 build: Guard against accidental introduction of new Boost dependencies (practicalswift) Pull request description: Guard against accidental introduction of new Boost dependencies. Context: bitcoin#13383 – the usage of `boost::lexical_cast` was introduced in bitcoin#11517 from December 2017 Tree-SHA512: 8d7b667ecf7ea62d84d9d41a71726f1e46c5a411b5a7db475c973ef364cac65609399afda7931e143a27d40c2947ff286e5e98ab263e8f0d225e2ae2c0872935
gades
pushed a commit
to cosanta/cosanta-core
that referenced
this pull request
May 1, 2022
… of throwing boost::lexical_cast<double>(...) f41d339 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ParseDouble(…)deserves to be used outside of its unit tests :-)