From b530201111d02028f37ae7d103615109fad061a8 Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Wed, 15 Sep 2021 23:47:33 -0700 Subject: [PATCH] Kernel: Make IPv4SocketTuple operator== by reference No reason for this to copy when comparing equality. --- Kernel/Net/IPv4SocketTuple.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/Net/IPv4SocketTuple.h b/Kernel/Net/IPv4SocketTuple.h index ad827f479c0..f731dfc13fc 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; };