diff options
author | Brian Gianforcaro <bgianf@serenityos.org> | 2021-09-15 23:47:33 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-16 17:17:13 +0200 |
commit | b530201111d02028f37ae7d103615109fad061a8 (patch) | |
tree | b911fdb15a7155f2044df1a183b2395a7ad07634 | |
parent | 85d36e56d2f6020fa12efdfed4febc8a8e8d8ec8 (diff) | |
download | serenity-b530201111d02028f37ae7d103615109fad061a8.zip |
Kernel: Make IPv4SocketTuple operator== by reference
No reason for this to copy when comparing equality.
-rw-r--r-- | Kernel/Net/IPv4SocketTuple.h | 2 |
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; }; |