mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
Allow int8_t optimized vector serialization
int8_t serialization is allowed, but not the optimized vector serialization. Fix that.
This commit is contained in:
parent
facaa14785
commit
fab41697a5
1 changed files with 2 additions and 0 deletions
|
@ -287,9 +287,11 @@ Span<std::byte> MakeWritableByteSpan(V&& v) noexcept
|
|||
// Helper functions to safely cast basic byte pointers to unsigned char pointers.
|
||||
inline unsigned char* UCharCast(char* c) { return reinterpret_cast<unsigned char*>(c); }
|
||||
inline unsigned char* UCharCast(unsigned char* c) { return c; }
|
||||
inline unsigned char* UCharCast(signed char* c) { return reinterpret_cast<unsigned char*>(c); }
|
||||
inline unsigned char* UCharCast(std::byte* c) { return reinterpret_cast<unsigned char*>(c); }
|
||||
inline const unsigned char* UCharCast(const char* c) { return reinterpret_cast<const unsigned char*>(c); }
|
||||
inline const unsigned char* UCharCast(const unsigned char* c) { return c; }
|
||||
inline const unsigned char* UCharCast(const signed char* c) { return reinterpret_cast<const unsigned char*>(c); }
|
||||
inline const unsigned char* UCharCast(const std::byte* c) { return reinterpret_cast<const unsigned char*>(c); }
|
||||
// Helper concept for the basic byte types.
|
||||
template <typename B>
|
||||
|
|
Loading…
Add table
Reference in a new issue