using existing tuple for WaitUntil

This commit is contained in:
Sergey Dudanov 2023-08-21 00:12:47 +04:00
parent e163b9659a
commit 0f2d5fb3a1

View file

@ -282,9 +282,8 @@ template<typename... Ts> class WaitUntilAction : public Action<Ts...>, public Co
this->var_ = std::make_tuple(x...); this->var_ = std::make_tuple(x...);
if (this->timeout_value_.has_value()) { if (this->timeout_value_.has_value()) {
this->set_timeout("timeout", this->timeout_value_.value(x...), [this, x = std::tuple<Ts...>(x...)]() { this->set_timeout("timeout", this->timeout_value_.value(x...),
std::apply([this](auto &...x) { this->play_next_(x...); }, x); [this]() { std::apply([this](auto &...x) { this->play_next_(x...); }, this->var_); });
});
} }
this->loop(); this->loop();