mirror of
https://github.com/esphome/esphome.git
synced 2024-11-28 09:44:12 +01:00
Fix linting issues
This commit is contained in:
parent
0a4aad9eb0
commit
c3d5b7803d
2 changed files with 4 additions and 4 deletions
|
@ -5,8 +5,8 @@ namespace esphome {
|
|||
static const char *const TAG = "event_emitter";
|
||||
|
||||
void RaiseEventEmitterFullError(EventEmitterListenerID id) {
|
||||
ESP_LOGE(TAG, "EventEmitter has reached the maximum number of listeners for event");
|
||||
ESP_LOGW(TAG, "Removing listener with ID %d to make space for new listener", id);
|
||||
ESP_LOGE(TAG, "EventEmitter has reached the maximum number of listeners for event");
|
||||
ESP_LOGW(TAG, "Removing listener with ID %ld to make space for new listener", id);
|
||||
}
|
||||
|
||||
} // namespace esphome
|
||||
|
|
|
@ -11,8 +11,8 @@ namespace esphome {
|
|||
using EventEmitterListenerID = uint32_t;
|
||||
void RaiseEventEmitterFullError(EventEmitterListenerID id);
|
||||
|
||||
// EventEmitter class that can emit events with a specific name (it is highly recommended to use an enum class for this) and a list of arguments.
|
||||
// Supports multiple listeners for each event.
|
||||
// EventEmitter class that can emit events with a specific name (it is highly recommended to use an enum class for this)
|
||||
// and a list of arguments. Supports multiple listeners for each event.
|
||||
template<typename EvtType, typename... Args> class EventEmitter {
|
||||
public:
|
||||
EventEmitterListenerID on(EvtType event, std::function<void(Args...)> listener) {
|
||||
|
|
Loading…
Reference in a new issue