-
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
refactor: Remove confusing static_cast in address types #28284
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. 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. |
Concept ACK |
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 fadf671
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 fadf671
…s types fadf671 Refactor: Remove confusing static_cast (MarcoFalke) faeea1a refactor: Add missing includes (MarcoFalke) Pull request description: It seems confusing to use `static_cast<uint160>(bla)` to call the constructor of `uint160`. The normal and common way to call a constructor is by simply calling it. (`uint160{bla}`). Do this, and also drop the constructor completely where the existing `const&` reference is enough. Also, add missing includes while touching the file. ACKs for top commit: vincenzopalazzo: ACK bitcoin@fadf671 TheCharlatan: ACK fadf671 Tree-SHA512: 8fb9a72203a6461b1f4b38bb90943ca25a92b218fc87da2022b90802e7747350e3668a13db3189201ad30e2e39a51d6658fed4aad176fd52cecc1c7f972c3134
It seems confusing to use
static_cast<uint160>(bla)
to call the constructor ofuint160
. The normal and common way to call a constructor is by simply calling it. (uint160{bla}
).Do this, and also drop the constructor completely where the existing
const&
reference is enough.Also, add missing includes while touching the file.