mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
refactor: Avoid casting away constness
Seems confusing and brittle to remove const and then add it back in the return type.
This commit is contained in:
parent
fa6394dd10
commit
3333f950d4
1 changed files with 1 additions and 1 deletions
|
|
@ -270,7 +270,7 @@ Span<std::byte> 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<const unsigned char*>(c); }
|
||||
inline const unsigned char* UCharCast(const unsigned char* c) { return c; }
|
||||
inline const unsigned char* UCharCast(const std::byte* c) { return reinterpret_cast<const unsigned char*>(c); }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue