mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 05:25:32 +03: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: https://github.com/SerenityOS/serenity/commit/09ce32039f Pull-request: https://github.com/SerenityOS/serenity/pull/22606 Issue: https://github.com/SerenityOS/serenity/issues/22381
@ -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…
Reference in New Issue
Block a user