From 3dbf3f60fe230b9d7988d1f65185b795c8cb6f9a Mon Sep 17 00:00:00 2001 From: Rapsssito Date: Sat, 13 Jul 2024 13:34:46 +0200 Subject: [PATCH] Fix linting issues --- esphome/components/esp32_ble_server/ble_server_automations.cpp | 2 +- esphome/components/esp32_ble_server/ble_server_automations.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/components/esp32_ble_server/ble_server_automations.cpp b/esphome/components/esp32_ble_server/ble_server_automations.cpp index 697928a58f..f9e1706ba4 100644 --- a/esphome/components/esp32_ble_server/ble_server_automations.cpp +++ b/esphome/components/esp32_ble_server/ble_server_automations.cpp @@ -20,7 +20,7 @@ Trigger> *BLETriggers::create_on_write_trigger(BLECharacter void BLECharacteristicSetValueActionManager::set_listener(BLECharacteristic *characteristic, EventEmitterListenerID listener_id, - std::function pre_notify_listener) { + const std::function& pre_notify_listener) { // Check if there is already a listener for this characteristic if (this->listeners_.count(characteristic) > 0) { // Unpack the pair listener_id, pre_notify_listener_id diff --git a/esphome/components/esp32_ble_server/ble_server_automations.h b/esphome/components/esp32_ble_server/ble_server_automations.h index d293621426..d9bc88268c 100644 --- a/esphome/components/esp32_ble_server/ble_server_automations.h +++ b/esphome/components/esp32_ble_server/ble_server_automations.h @@ -37,7 +37,7 @@ class BLECharacteristicSetValueActionManager return &instance; } void set_listener(BLECharacteristic *characteristic, EventEmitterListenerID listener_id, - std::function pre_notify_listener); + const std::function& pre_notify_listener); EventEmitterListenerID get_listener(BLECharacteristic *characteristic) { return this->listeners_[characteristic].first; }