From e6a24b31018f6b7161a7ce1fc2996fa937e6d4a3 Mon Sep 17 00:00:00 2001 From: Guenter Obiltschnig Date: Fri, 24 May 2013 22:06:36 +0200 Subject: [PATCH] fixed GH# 188: Net: SocketAddress operator < unusable for std::map key --- Net/src/SocketAddress.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Net/src/SocketAddress.cpp b/Net/src/SocketAddress.cpp index 58c080e30..4fe709b72 100644 --- a/Net/src/SocketAddress.cpp +++ b/Net/src/SocketAddress.cpp @@ -161,11 +161,11 @@ SocketAddress::~SocketAddress() bool SocketAddress::operator < (const SocketAddress& socketAddress) const { - if (family() < addr.family()) return true; - if (family() > addr.family()) return false; - if (host() < addr.host()) return true; - if (host() > addr.host()) return false; - return (port() < addr.port()); + if (family() < socketAddress.family()) return true; + if (family() > socketAddress.family()) return false; + if (host() < socketAddress.host()) return true; + if (host() > socketAddress.host()) return false; + return (port() < socketAddress.port()); }