[Ns-bugs] [Bug 125] New: Ipv4::GetIfIndexByAddress is virtual and has an argument with a default value

bugzilla-daemon@nsnam-www.ece.gatech.edu bugzilla-daemon at nsnam-www.ece.gatech.edu
Mon Jan 7 02:12:22 PST 2008


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

           Summary: Ipv4::GetIfIndexByAddress is virtual and has an argument
                    with a default value
           Product: ns-3
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P3
         Component: node module
        AssignedTo: ns-bugs at isi.edu
        ReportedBy: mathieu.lacage at sophia.inria.fr


This is really evil: the default value for the argument is not part of the
signature so, a subclass can specify a different default value or no default
value at all which means that the behavior of the call to GetIfIndexByAddress
is going to depend on the type of the pointer used to make the call. 

Virtual methods should _never_ use arguments with default values.


-- 
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