mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 13:34:54 +01:00
Make IPAddress's operator!= compare values, not memory addresses. (#5537)
Co-authored-by: Ben Winslow <rain@bluecherry.net>
This commit is contained in:
parent
06eff72065
commit
26f12cd3bb
1 changed files with 1 additions and 1 deletions
|
@ -87,7 +87,7 @@ struct IPAddress {
|
|||
bool is_ip6() { return IP_IS_V6(&ip_addr_); }
|
||||
std::string str() const { return ipaddr_ntoa(&ip_addr_); }
|
||||
bool operator==(const IPAddress &other) const { return ip_addr_cmp(&ip_addr_, &other.ip_addr_); }
|
||||
bool operator!=(const IPAddress &other) const { return !(&ip_addr_ == &other.ip_addr_); }
|
||||
bool operator!=(const IPAddress &other) const { return !ip_addr_cmp(&ip_addr_, &other.ip_addr_); }
|
||||
IPAddress &operator+=(uint8_t increase) {
|
||||
if (IP_IS_V4(&ip_addr_)) {
|
||||
#if LWIP_IPV6
|
||||
|
|
Loading…
Reference in a new issue