1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-03 00:21:56 +00:00

Compare commits

...

1 Commits

Author SHA1 Message Date
J. Nick Koston
c8f7bceb34 [web_server] Remove redundant assignment in deq_push_back_with_dedup_ 2025-10-31 22:56:02 -05:00
2 changed files with 2 additions and 4 deletions

View File

@@ -111,8 +111,7 @@ void DeferredUpdateEventSource::deq_push_back_with_dedup_(void *source, message_
// Use range-based for loop instead of std::find_if to reduce template instantiation overhead and binary size
for (auto &event : this->deferred_queue_) {
if (event == item) {
event = item;
return;
return; // Already in queue, no need to update since items are equal
}
}
this->deferred_queue_.push_back(item);

View File

@@ -494,8 +494,7 @@ void AsyncEventSourceResponse::deq_push_back_with_dedup_(void *source, message_g
// Use range-based for loop instead of std::find_if to reduce template instantiation overhead and binary size
for (auto &event : this->deferred_queue_) {
if (event == item) {
event = item;
return;
return; // Already in queue, no need to update since items are equal
}
}
this->deferred_queue_.push_back(item);