mirror of
https://github.com/esphome/esphome.git
synced 2026-09-17 18:18:43 +00:00
[text_sensor] Use a user provided default constructor (#19112)
This commit is contained in:
@@ -29,7 +29,8 @@ class TextSensor : public EntityBase {
|
||||
public:
|
||||
std::string state;
|
||||
|
||||
TextSensor() = default;
|
||||
// User provided, not "= default": `new(p) TextSensor()` would zero-fill .bss that is already zero.
|
||||
TextSensor() {}
|
||||
~TextSensor() = default;
|
||||
|
||||
/// Getter-syntax for .state.
|
||||
|
||||
Reference in New Issue
Block a user