From 2f56af00786d233a29990ec03e4970a9eebe4a0f Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 1 Nov 2025 12:41:22 -0500 Subject: [PATCH] [web_server_idf] Reduce flash by eliminating temporary string allocations in event formatting --- esphome/components/web_server_idf/web_server_idf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/web_server_idf/web_server_idf.h b/esphome/components/web_server_idf/web_server_idf.h index 7f22bf264c..5ec6fec009 100644 --- a/esphome/components/web_server_idf/web_server_idf.h +++ b/esphome/components/web_server_idf/web_server_idf.h @@ -77,7 +77,7 @@ class AsyncResponseStream : public AsyncWebServerResponse { size_t get_content_size() const override { return this->content_.size(); }; void print(const char *str) { this->content_.append(str); } - void print(const std::string &str) { this->content_.append(str.c_str(), str.size()); } + void print(const std::string &str) { this->content_.append(str); } void print(float value); void printf(const char *fmt, ...) __attribute__((format(printf, 2, 3)));