mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-03 14:50:18 +00:00
Kernel: Make IPv4SocketTuple operator== by reference
No reason for this to copy when comparing equality.
This commit is contained in:
parent
85d36e56d2
commit
b530201111
Notes:
sideshowbarker
2024-07-18 03:51:50 +09:00
Author: https://github.com/bgianfo
Commit: b530201111
Pull-request: https://github.com/SerenityOS/serenity/pull/10053
1 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,7 @@ public:
|
||||||
IPv4Address peer_address() const { return m_peer_address; };
|
IPv4Address peer_address() const { return m_peer_address; };
|
||||||
u16 peer_port() const { return m_peer_port; };
|
u16 peer_port() const { return m_peer_port; };
|
||||||
|
|
||||||
bool operator==(const IPv4SocketTuple other) const
|
bool operator==(const IPv4SocketTuple& other) const
|
||||||
{
|
{
|
||||||
return other.local_address() == m_local_address && other.local_port() == m_local_port && other.peer_address() == m_peer_address && other.peer_port() == m_peer_port;
|
return other.local_address() == m_local_address && other.local_port() == m_local_port && other.peer_address() == m_peer_address && other.peer_port() == m_peer_port;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue