|
reSIProcate/stack
9694
|
A "less than" comparator for Tuple, for use in map containers etc. More...
#include <Tuple.hxx>
Public Member Functions | |
| bool | operator() (const Tuple &x, const Tuple &y) const |
A "less than" comparator for Tuple, for use in map containers etc.
Comparison is based only on transport type
Definition at line 955 of file Tuple.cxx.
References resip::Tuple::mSockaddr, and resip::Tuple::mTransportType.
{
if (lhs.mTransportType < rhs.mTransportType)
{
return true;
}
else if (lhs.mTransportType > rhs.mTransportType)
{
return false;
}
#ifdef USE_IPV6
else if (lhs.mSockaddr.sa_family == AF_INET6 &&
rhs.mSockaddr.sa_family == AF_INET)
{
return true;
}
else if (lhs.mSockaddr.sa_family == AF_INET &&
rhs.mSockaddr.sa_family == AF_INET6)
{
return false;
}
#endif
else
{
return false;
}
};
1.7.5.1