[core] Drop always_inline attributes to avoid flash bloat

The always_inline on Trigger::trigger(), ActionList::play(), and
Automation::trigger() duplicates code at every trigger call site,
adding ~384 bytes of flash. Revert to compiler-managed inlining
and keep only the play_complex overrides (phase 2).
This commit is contained in:
J. Nick Koston
2026-03-20 18:46:46 -10:00
parent 34345b86fa
commit 536093acfa
+3 -3
View File
@@ -322,7 +322,7 @@ template<typename... Ts> class Automation;
template<typename... Ts> class Trigger {
public:
/// Inform the parent automation that the event has triggered.
__attribute__((always_inline)) void trigger(const Ts &...x) {
void trigger(const Ts &...x) {
if (this->automation_parent_ == nullptr)
return;
this->automation_parent_->trigger(x...);
@@ -429,7 +429,7 @@ template<typename... Ts> class ActionList {
this->add_action(action);
}
}
__attribute__((always_inline)) void play(const Ts &...x) {
void play(const Ts &...x) {
if (this->actions_begin_ != nullptr)
this->actions_begin_->play_complex(x...);
}
@@ -473,7 +473,7 @@ template<typename... Ts> class Automation {
void stop() { this->actions_.stop(); }
__attribute__((always_inline)) void trigger(const Ts &...x) { this->actions_.play(x...); }
void trigger(const Ts &...x) { this->actions_.play(x...); }
bool is_running() { return this->actions_.is_running(); }