Compare commits

..
Author SHA1 Message Date
J. Nick Koston e3fc441be2 [select] Use a user provided default constructor 2026-09-11 21:26:33 -05:00
2 changed files with 4 additions and 3 deletions

No files matched your search

+2 -1
View File
@@ -30,7 +30,8 @@ class Select : public EntityBase {
public:
SelectTraits traits;
Select() = default;
// User provided, not "= default": `new(p) Select()` would zero-fill .bss that is already zero.
Select() {}
~Select() = default;
void publish_state(const std::string &state) { this->publish_state(state.c_str()); }
+2 -2
View File
@@ -30,8 +30,8 @@ class TextTraits {
TextMode get_mode() const { return this->mode_; }
protected:
int min_length_{0};
int max_length_{0};
int min_length_;
int max_length_;
const char *pattern_{""};
TextMode mode_{TEXT_MODE_TEXT};
};