-
Notifications
You must be signed in to change notification settings - Fork 35.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
opportunistic 1p1c followups #30012
opportunistic 1p1c followups #30012
Conversation
…strings No behavior change, but getting the hex string is more expensive than necessary.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 6119f76
Can this also address: txorphanage.cpp:281:21: error: loop variable 'child_iter' creates a copy from type '__gnu_debug::_Safe_iterator<std::_Rb_tree_iterator<std::pair<const transaction_identifier<false>, TxOrphanage::OrphanTx>>, std::map<transaction_identifier<false>, TxOrphanage::OrphanTx>> const' [-Werror,-Wrange-loop-construct]
281 | for (const auto child_iter : iters) {
| ^
txorphanage.cpp:281:10: note: use reference type '__gnu_debug::_Safe_iterator<std::_Rb_tree_iterator<std::pair<const transaction_identifier<false>, TxOrphanage::OrphanTx>>, std::map<transaction_identifier<false>, TxOrphanage::OrphanTx>> const &' to prevent copying
281 | for (const auto child_iter : iters) {
| ^~~~~~~~~~~~~~~~~~~~~~~
| &
txorphanage.cpp:313:21: error: loop variable 'child_iter' creates a copy from type '__gnu_debug::_Safe_iterator<std::_Rb_tree_iterator<std::pair<const transaction_identifier<false>, TxOrphanage::OrphanTx>>, std::map<transaction_identifier<false>, TxOrphanage::OrphanTx>> const' [-Werror,-Wrange-loop-construct]
313 | for (const auto child_iter : iters) {
| ^
txorphanage.cpp:313:10: note: use reference type '__gnu_debug::_Safe_iterator<std::_Rb_tree_iterator<std::pair<const transaction_identifier<false>, TxOrphanage::OrphanTx>>, std::map<transaction_identifier<false>, TxOrphanage::OrphanTx>> const &' to prevent copying
313 | for (const auto child_iter : iters) {
| ^~~~~~~~~~~~~~~~~~~~~~~
| & |
Added. I made a copy instead of reference because it's a pointer. |
reACK 7f6fb73 just the non-pointer copying added |
Followups from #28970: