File tree 2 files changed +7
-1
lines changed 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
113
113
&& (memcmp (addr._address .bytes , _address.bytes , sizeof (_address.bytes )) == 0 );
114
114
}
115
115
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
+
116
122
bool IPAddress::operator ==(const uint8_t * addr) const
117
123
{
118
124
// IPv4 only comparison to byte pointer
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ class IPAddress: public Printable
75
75
}
76
76
77
77
bool operator ==(const IPAddress& addr) const ;
78
- bool operator !=(const IPAddress& addr) const { return !(* this == addr); } ;
78
+ bool operator !=(const IPAddress& addr) const ;
79
79
bool operator ==(const uint8_t * addr) const ;
80
80
81
81
// 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