mirror of
https://github.com/esphome/esphome.git
synced 2026-09-19 19:18:47 +00:00
[core] Replace std::function with lightweight Callback in CallbackManager (#14853)
This commit is contained in:
@@ -20,6 +20,5 @@ void Button::press() {
|
||||
this->press_action();
|
||||
this->press_callback_.call();
|
||||
}
|
||||
void Button::add_on_press_callback(std::function<void()> &&callback) { this->press_callback_.add(std::move(callback)); }
|
||||
|
||||
} // namespace esphome::button
|
||||
|
||||
Reference in New Issue
Block a user