[Ns-bugs] [Bug 86] add missing functions to Mac48Address code

bugzilla-daemon@nsnam-www.ece.gatech.edu bugzilla-daemon at nsnam-www.ece.gatech.edu
Tue Oct 9 11:44:09 PDT 2007


http://www.nsnam.org/bugzilla/show_bug.cgi?id=86





------- Comment #2 from mathieu.lacage at sophia.inria.fr  2007-10-09 14:44 -------
(In reply to comment #1)
> +bool operator < (const Mac48Address &a, const Mac48Address &b)
> +{
> + uint8_t aP[6];
> + uint8_t bP[6];
> + a.CopyTo (aP);
> + b.CopyTo (bP); 
> 
> Isn't it easier/faster to compare directly m_data of a and b?  I think you can
> do it if only operator < is a member of the class... (in C++ you can access
> private members of other instances of the same class!).

you can make the non-member function be a friend of the class. But, clearly,
the goal was not performance here.

> 


-- 
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the Ns-bugs mailing list