1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-19 16:25:50 +00:00

[web_server] Remove redundant assignment in deq_push_back_with_dedup_

This commit is contained in:
J. Nick Koston
2025-10-31 22:56:02 -05:00
parent 30f2a4395f
commit c8f7bceb34
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);