mirror of
https://github.com/esphome/esphome.git
synced 2026-09-17 18:18:43 +00:00
[core] Use a user provided default constructor for DelayAction (#19137)
This commit is contained in:
@@ -180,7 +180,9 @@ class ProjectUpdateTrigger : public Trigger<std::string>, public Component {
|
||||
|
||||
template<typename... Ts> class DelayAction : public Action<Ts...> {
|
||||
public:
|
||||
explicit DelayAction() = default;
|
||||
// User provided, not "= default": `new(p) DelayAction()` would zero-fill .bss that is already zero.
|
||||
// constexpr and noexcept keep the rest of the implicit constructor's contract.
|
||||
constexpr explicit DelayAction() noexcept {}
|
||||
|
||||
TEMPLATABLE_VALUE(uint32_t, delay)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user