mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
AK: Rename span() to bytes() when appropriate.
I originally defined the bytes() method for the String class, because it made it obvious that it's a span of bytes instead of span of characters. This commit makes this more consistent by defining a bytes() method when the type of the span is known to be u8. Additionaly, the cast operator to Bytes is overloaded for ByteBuffer and such.
This commit is contained in:
@@ -53,7 +53,7 @@ void DwarfInfo::populate_compilation_units()
|
||||
if (m_debug_info_data.is_null())
|
||||
return;
|
||||
|
||||
InputMemoryStream stream(m_debug_info_data.span());
|
||||
InputMemoryStream stream{ m_debug_info_data };
|
||||
while (!stream.eof()) {
|
||||
auto unit_offset = stream.offset();
|
||||
CompilationUnitHeader compilation_unit_header {};
|
||||
|
||||
Reference in New Issue
Block a user