File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,12 @@ bool IPAddress::operator==(const IPAddress& addr) const
113113 && (memcmp (addr._address .bytes , _address.bytes , sizeof (_address.bytes )) == 0 );
114114}
115115
116+ bool IPAddress::operator !=(const IPAddress& addr) const
117+ {
118+ return (addr._type != _type)
119+ || (memcmp (addr._address .bytes , _address.bytes , sizeof (_address.bytes )) != 0 );
120+ }
121+
116122bool IPAddress::operator ==(const uint8_t * addr) const
117123{
118124 // IPv4 only comparison to byte pointer
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ class IPAddress: public Printable
7575 }
7676
7777 bool operator ==(const IPAddress& addr) const ;
78- bool operator !=(const IPAddress& addr) const { return !(* this == addr); } ;
78+ bool operator !=(const IPAddress& addr) const ;
7979 bool operator ==(const uint8_t * addr) const ;
8080
8181 // Overloaded index operator to allow getting and setting individual octets of the address
You can’t perform that action at this time.
0 commit comments