mirror of
https://github.com/esphome/esphome.git
synced 2026-09-17 18:18:43 +00:00
[scheduler] Inline delete instead of delete_item_ wrapper
A single-line wrapper around delete adds no value.
This commit is contained in:
@@ -734,7 +734,7 @@ void Scheduler::recycle_item_main_loop_(SchedulerItem *item) {
|
||||
#ifdef ESPHOME_DEBUG_SCHEDULER
|
||||
ESP_LOGD(TAG, "Pool full (size: %zu), deleting item", this->scheduler_item_pool_.size());
|
||||
#endif
|
||||
delete_item_(item);
|
||||
delete item;
|
||||
#ifdef ESPHOME_DEBUG_SCHEDULER
|
||||
this->debug_live_items_--;
|
||||
#endif
|
||||
|
||||
@@ -353,9 +353,6 @@ class Scheduler {
|
||||
// IMPORTANT: Caller must hold the scheduler lock before calling this function.
|
||||
void recycle_item_main_loop_(SchedulerItem *item);
|
||||
|
||||
// Helper to delete a SchedulerItem
|
||||
static void delete_item_(SchedulerItem *item) { delete item; }
|
||||
|
||||
// Helper to perform full cleanup when too many items are cancelled
|
||||
void full_cleanup_removed_items_();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user