mirror of
https://github.com/esphome/esphome.git
synced 2025-08-07 19:07:45 +00:00
tidy
This commit is contained in:
parent
b000b1b70c
commit
c33c14a46f
@ -517,7 +517,7 @@ class APIConnection : public APIServerConnection {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
// Helper to cleanup items from the beginning
|
// Helper to cleanup items from the beginning
|
||||||
void cleanup_items(size_t count) {
|
void cleanup_items_(size_t count) {
|
||||||
for (size_t i = 0; i < count; i++) {
|
for (size_t i = 0; i < count; i++) {
|
||||||
items[i].creator.cleanup(items[i].message_type);
|
items[i].creator.cleanup(items[i].message_type);
|
||||||
}
|
}
|
||||||
@ -541,14 +541,14 @@ class APIConnection : public APIServerConnection {
|
|||||||
|
|
||||||
// Clear all items with proper cleanup
|
// Clear all items with proper cleanup
|
||||||
void clear() {
|
void clear() {
|
||||||
cleanup_items(items.size());
|
cleanup_items_(items.size());
|
||||||
items.clear();
|
items.clear();
|
||||||
batch_start_time = 0;
|
batch_start_time = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove processed items from the front with proper cleanup
|
// Remove processed items from the front with proper cleanup
|
||||||
void remove_front(size_t count) {
|
void remove_front(size_t count) {
|
||||||
cleanup_items(count);
|
cleanup_items_(count);
|
||||||
items.erase(items.begin(), items.begin() + count);
|
items.erase(items.begin(), items.begin() + count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user