[core] Replace std::function with lightweight Callback in CallbackManager (#14853)

This commit is contained in:
J. Nick Koston authored and GitHub committed 2026-03-18 18:41:05 -10:00
1 parent fdd5956c1e
commit 8fe36cde23
85 files changed
+319 -385

No files matched your search

-5
View File
@@ -79,11 +79,6 @@ void Sensor::publish_state(float state) {
#endif
}
void Sensor::add_on_state_callback(std::function<void(float)> &&callback) { this->callback_.add(std::move(callback)); }
void Sensor::add_on_raw_state_callback(std::function<void(float)> &&callback) {
this->raw_callback_.add(std::move(callback));
}
#ifdef USE_SENSOR_FILTER
void Sensor::add_filter(Filter *filter) {
// inefficient, but only happens once on every sensor setup and nobody's going to have massive amounts of