refactor: Remove confusing static_cast in address types#28284
Merged
fanquake merged 2 commits intobitcoin:masterfrom Aug 22, 2023
Merged
refactor: Remove confusing static_cast in address types#28284fanquake merged 2 commits intobitcoin:masterfrom
fanquake merged 2 commits intobitcoin:masterfrom
Conversation
Contributor
|
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. |
Contributor
|
Concept ACK |
sedited
approved these changes
Aug 22, 2023
Frank-GER
pushed a commit
to syscoin/syscoin
that referenced
this pull request
Sep 8, 2023
…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
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.
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.