mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 07:36:50 +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:
@@ -218,7 +218,7 @@ void TCPSocket::send_tcp_packet(u16 flags, const void* payload, size_t payload_s
|
||||
|
||||
routing_decision.adapter->send_ipv4(
|
||||
routing_decision.next_hop, peer_address(), IPv4Protocol::TCP,
|
||||
buffer.span(), ttl());
|
||||
buffer, ttl());
|
||||
|
||||
m_packets_out++;
|
||||
m_bytes_out += buffer.size();
|
||||
@@ -246,7 +246,7 @@ void TCPSocket::send_outgoing_packets()
|
||||
#endif
|
||||
routing_decision.adapter->send_ipv4(
|
||||
routing_decision.next_hop, peer_address(), IPv4Protocol::TCP,
|
||||
packet.buffer.span(), ttl());
|
||||
packet.buffer, ttl());
|
||||
|
||||
m_packets_out++;
|
||||
m_bytes_out += packet.buffer.size();
|
||||
|
||||
Reference in New Issue
Block a user