1
0
mirror of https://github.com/esphome/esphome.git synced 2025-04-12 22:00:30 +01:00

[udp] fix clang tidy (#8351)

This commit is contained in:
tomaszduda23 2025-03-03 22:08:42 +01:00 committed by GitHub
parent 4ed78023b6
commit 1d6d0d66dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -70,7 +70,9 @@ class UDPComponent : public PollingComponent {
}
#endif
void add_address(const char *addr) { this->addresses_.emplace_back(addr); }
#ifdef USE_NETWORK
void set_listen_address(const char *listen_addr) { this->listen_address_ = network::IPAddress(listen_addr); }
#endif
void set_port(uint16_t port) { this->port_ = port; }
float get_setup_priority() const override { return setup_priority::AFTER_WIFI; }
@ -144,8 +146,9 @@ class UDPComponent : public PollingComponent {
std::vector<BinarySensor> binary_sensors_{};
std::map<std::string, std::map<std::string, binary_sensor::BinarySensor *>> remote_binary_sensors_{};
#endif
#ifdef USE_NETWORK
optional<network::IPAddress> listen_address_{};
#endif
std::map<std::string, Provider> providers_{};
std::vector<uint8_t> ping_header_{};
std::vector<uint8_t> header_{};