mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 02:13:56 +09:00
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:
parent
52ce887b80
commit
09ce32039f
Notes:
sideshowbarker
2024-07-16 20:08:14 +09:00
Author: https://github.com/ADKaster
Commit: 09ce32039f
Pull-request: https://github.com/SerenityOS/serenity/pull/22606
Issue: https://github.com/SerenityOS/serenity/issues/22381
1 changed files with 1 additions and 1 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue