summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Gianforcaro <bgianf@serenityos.org>2021-09-15 23:47:33 -0700
committerAndreas Kling <kling@serenityos.org>2021-09-16 17:17:13 +0200
commitb530201111d02028f37ae7d103615109fad061a8 (patch)
treeb911fdb15a7155f2044df1a183b2395a7ad07634
parent85d36e56d2f6020fa12efdfed4febc8a8e8d8ec8 (diff)
downloadserenity-b530201111d02028f37ae7d103615109fad061a8.zip
Kernel: Make IPv4SocketTuple operator== by reference
No reason for this to copy when comparing equality.
-rw-r--r--Kernel/Net/IPv4SocketTuple.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Net/IPv4SocketTuple.h b/Kernel/Net/IPv4SocketTuple.h
index ad827f479c..f731dfc13f 100644
--- a/Kernel/Net/IPv4SocketTuple.h
+++ b/Kernel/Net/IPv4SocketTuple.h
@@ -26,7 +26,7 @@ public:
IPv4Address peer_address() const { return m_peer_address; };
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;
};