Skip to content

Commit e6a24b3

Browse files
committed
fixed GH# 188: Net: SocketAddress operator < unusable for std::map key
1 parent 28320dd commit e6a24b3

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎Net/src/SocketAddress.cpp‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,11 @@ SocketAddress::~SocketAddress()
161161

162162
bool SocketAddress::operator < (const SocketAddress& socketAddress) const
163163
{
164-
if (family() < addr.family()) return true;
165-
if (family() > addr.family()) return false;
166-
if (host() < addr.host()) return true;
167-
if (host() > addr.host()) return false;
168-
return (port() < addr.port());
164+
if (family() < socketAddress.family()) return true;
165+
if (family() > socketAddress.family()) return false;
166+
if (host() < socketAddress.host()) return true;
167+
if (host() > socketAddress.host()) return false;
168+
return (port() < socketAddress.port());
169169
}
170170

171171

0 commit comments

Comments
 (0)