AK: Use cast to const void pointer in to_readonly_span helper

This lets developers actually hex-dump print `Span<T const>` using the
helper as intended.
This commit is contained in:
Andrew Kaster 2024-01-05 14:48:44 -07:00 committed by Andreas Kling
parent 52ce887b80
commit 09ce32039f
Notes: sideshowbarker 2024-07-16 20:08:14 +09:00

View File

@ -326,7 +326,7 @@ template<typename T>
requires(IsTrivial<T>)
ReadonlyBytes to_readonly_bytes(Span<T> span)
{
return ReadonlyBytes { static_cast<void*>(span.data()), span.size() * sizeof(T) };
return ReadonlyBytes { static_cast<void const*>(span.data()), span.size() * sizeof(T) };
}
template<typename T>