Skip to content

Commit 1fb442d

Browse files
committed
add 'const' to IPAddress::addr_type()
1 parent a2a6bd8 commit 1fb442d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cores/esp32/IPAddress.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ IPAddress& IPAddress::from_ip_addr_t(const ip_addr_t* addr){
417417
return *this;
418418
}
419419

420-
esp_ip6_addr_type_t IPAddress::addr_type(){
420+
esp_ip6_addr_type_t IPAddress::addr_type() const {
421421
if(_type != IPv6){
422422
return ESP_IP6_ADDR_IS_UNKNOWN;
423423
}

cores/esp32/IPAddress.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class IPAddress : public Printable {
102102
IPAddress(const ip_addr_t *addr);
103103
void to_ip_addr_t(ip_addr_t* addr) const;
104104
IPAddress& from_ip_addr_t(const ip_addr_t* addr);
105-
esp_ip6_addr_type_t addr_type();
105+
esp_ip6_addr_type_t addr_type() const;
106106
uint8_t zone() const { return (type() == IPv6)?_zone:0; }
107107
size_t printTo(Print& p, bool includeZone) const;
108108

0 commit comments

Comments
 (0)