mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-30 06:51:08 +02:00
refactor: Avoid needless, unsafe c-style cast
This commit is contained in:
@@ -139,7 +139,7 @@ std::string EncodeBase58Check(Span<const unsigned char> input)
|
|||||||
// add 4-byte hash check to the end
|
// add 4-byte hash check to the end
|
||||||
std::vector<unsigned char> vch(input.begin(), input.end());
|
std::vector<unsigned char> vch(input.begin(), input.end());
|
||||||
uint256 hash = Hash(vch);
|
uint256 hash = Hash(vch);
|
||||||
vch.insert(vch.end(), (unsigned char*)&hash, (unsigned char*)&hash + 4);
|
vch.insert(vch.end(), hash.data(), hash.data() + 4);
|
||||||
return EncodeBase58(vch);
|
return EncodeBase58(vch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user