1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-18 07:45:56 +00:00

[network] Store use_address in RODATA to save RAM (#11707)

This commit is contained in:
J. Nick Koston
2025-11-04 15:52:10 -06:00
committed by GitHub
parent aed7505f53
commit 531b27582a
11 changed files with 33 additions and 22 deletions

View File

@@ -273,8 +273,8 @@ network::IPAddress WiFiComponent::get_dns_address(int num) {
}
// set_use_address() is guaranteed to be called during component setup by Python code generation,
// so use_address_ will always be valid when get_use_address() is called - no fallback needed.
const std::string &WiFiComponent::get_use_address() const { return this->use_address_; }
void WiFiComponent::set_use_address(const std::string &use_address) { this->use_address_ = use_address; }
const char *WiFiComponent::get_use_address() const { return this->use_address_; }
void WiFiComponent::set_use_address(const char *use_address) { this->use_address_ = use_address; }
#ifdef USE_WIFI_AP
void WiFiComponent::setup_ap_config_() {