diff --git a/src/span.h b/src/span.h index 0563556dc27..792a0a9c075 100644 --- a/src/span.h +++ b/src/span.h @@ -270,7 +270,7 @@ Span MakeWritableByteSpan(V&& v) noexcept inline unsigned char* UCharCast(char* c) { return (unsigned char*)c; } inline unsigned char* UCharCast(unsigned char* c) { return c; } inline unsigned char* UCharCast(std::byte* c) { return (unsigned char*)c; } -inline const unsigned char* UCharCast(const char* c) { return (unsigned char*)c; } +inline const unsigned char* UCharCast(const char* c) { return reinterpret_cast(c); } inline const unsigned char* UCharCast(const unsigned char* c) { return c; } inline const unsigned char* UCharCast(const std::byte* c) { return reinterpret_cast(c); }