bug 206: allow comparing addresses of different types.
This commit is contained in:
1 parent
c914ccbdb9
commit
f2bd0c0340
1 file changed
+8
-2
+8
-2
@@ -162,8 +162,14 @@ bool operator != (const Address &a, const Address &b)
|
||||
}
|
||||
bool operator < (const Address &a, const Address &b)
|
||||
{
|
||||
// XXX: it is not clear to me how to order based on type.
|
||||
// so, we do not compare the types here but we should.
|
||||
if (a.m_type < b.m_type)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (a.m_type > b.m_type)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (a.m_len < b.m_len)
|
||||
{
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user