mirror of
https://github.com/esphome/esphome.git
synced 2026-09-18 02:28:42 +00:00
[ethernet_info] Use a user provided default constructor for IPAddressEthernetInfo (#19166)
This commit is contained in:
@@ -13,6 +13,9 @@ class IPAddressEthernetInfo final : public Component,
|
||||
public text_sensor::TextSensor,
|
||||
public ethernet::EthernetIPStateListener {
|
||||
public:
|
||||
// User provided, not "= default": `new(p) IPAddressEthernetInfo()` would zero-fill .bss that is already zero.
|
||||
IPAddressEthernetInfo() {}
|
||||
|
||||
void setup() override;
|
||||
void dump_config() override;
|
||||
void add_ip_sensors(uint8_t index, text_sensor::TextSensor *s) { this->ip_sensors_[index] = s; }
|
||||
|
||||
Reference in New Issue
Block a user