mirror of
https://github.com/esphome/esphome.git
synced 2026-11-06 13:15:57 +00:00
Also guard the NumberRange size so an added field fails the build
This commit is contained in:
1 file changed
+1
@@ -22,6 +22,7 @@ struct NumberRange {
|
||||
static_assert(std::is_same_v<decltype(NumberRange::min_value), float>, "NumberRange fields must stay float");
|
||||
static_assert(std::is_same_v<decltype(NumberRange::max_value), float>, "NumberRange fields must stay float");
|
||||
static_assert(std::is_same_v<decltype(NumberRange::step), float>, "NumberRange fields must stay float");
|
||||
static_assert(sizeof(NumberRange) == 3 * sizeof(float), "NumberRange is read from flash with word loads");
|
||||
|
||||
class NumberTraits {
|
||||
public:
|
||||
|
||||
Reference in new issue
Block a user