mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 14:15:07 +00:00
ByteBuffer: Remove pointer() in favor of data()
We had two ways to get the data inside a ByteBuffer. That was silly.
This commit is contained in:
parent
dd696e7c75
commit
8f45a259fc
30 changed files with 89 additions and 92 deletions
|
@ -67,7 +67,7 @@ int UDPSocket::protocol_send(const void* data, int data_length)
|
|||
if (routing_decision.is_zero())
|
||||
return -EHOSTUNREACH;
|
||||
auto buffer = ByteBuffer::create_zeroed(sizeof(UDPPacket) + data_length);
|
||||
auto& udp_packet = *(UDPPacket*)(buffer.pointer());
|
||||
auto& udp_packet = *(UDPPacket*)(buffer.data());
|
||||
udp_packet.set_source_port(local_port());
|
||||
udp_packet.set_destination_port(peer_port());
|
||||
udp_packet.set_length(sizeof(UDPPacket) + data_length);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue