Skip to content

Commit 759b5db

Browse files
committed
Make Action play() use const parameter
1 parent 698c763 commit 759b5db

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

components/pinscan/automation.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ template<typename... Ts> class SetPinAction : public Action<Ts...> {
1111
public:
1212
explicit SetPinAction(Pinscan *a_pinscan) : pinscan_(a_pinscan) {}
1313
TEMPLATABLE_VALUE(int, pin);
14-
void play(Ts... x) override { this->pinscan_->set_pin(this->pin_.value(x...)); }
14+
void play(const Ts &...x) override { this->pinscan_->set_pin(this->pin_.value(x...)); }
1515

1616
protected:
1717
Pinscan *pinscan_;
@@ -21,7 +21,7 @@ template<typename... Ts> class SetModeAction : public Action<Ts...> {
2121
public:
2222
explicit SetModeAction(Pinscan *a_pinscan) : pinscan_(a_pinscan) {}
2323
TEMPLATABLE_VALUE(int, mode);
24-
void play(Ts... x) override { this->pinscan_->set_mode(this->mode_.value(x...)); }
24+
void play(const Ts &...x) override { this->pinscan_->set_mode(this->mode_.value(x...)); }
2525

2626
protected:
2727
Pinscan *pinscan_;

0 commit comments

Comments
 (0)