mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 22:25:08 +00:00
Kernel: Make TCPSocket::for_each() callback accept a reference
Yay for less arrows!
This commit is contained in:
parent
84a54c7cf7
commit
d06f4291a8
3 changed files with 14 additions and 14 deletions
|
@ -8,11 +8,11 @@
|
|||
|
||||
//#define TCP_SOCKET_DEBUG
|
||||
|
||||
void TCPSocket::for_each(Function<void(TCPSocket*&)> callback)
|
||||
void TCPSocket::for_each(Function<void(TCPSocket&)> callback)
|
||||
{
|
||||
LOCKER(sockets_by_tuple().lock());
|
||||
for (auto& it : sockets_by_tuple().resource())
|
||||
callback(it.value);
|
||||
callback(*it.value);
|
||||
}
|
||||
|
||||
Lockable<HashMap<IPv4SocketTuple, TCPSocket*>>& TCPSocket::sockets_by_tuple()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue