[Ns-developers] Mac48Address operator < cosmetics
Pavel Boyko
boyko at iitp.ru
Sun Mar 15 05:34:38 PDT 2009
Hi all,
First 4 lines of this method (node/mac48-address.cc by Mathieu) seem to be
meaningless:
bool operator < (const Mac48Address &a, const Mac48Address &b)
{
uint8_t aP[6];
uint8_t bP[6];
a.CopyTo (aP);
b.CopyTo (bP);
for (uint8_t i = 0; i < 6; i++)
{
if (a.m_address[i] < b.m_address[i])
{
return true;
}
else if (a.m_address[i] > b.m_address[i])
{
return false;
}
}
return false;
}
Mathieu, if you agree, please remove CopyTo (or remove friend in class
declaration and use copy).
Thanks,
Pavel Boyko
researcher
IITP RAS
More information about the Ns-developers
mailing list