From 94ce0576cf8d63b695401f8777a697331583bce6 Mon Sep 17 00:00:00 2001 From: Tomasz Duda Date: Wed, 24 Jul 2024 19:38:03 +0200 Subject: [PATCH] fix clang --- esphome/components/climate/climate.h | 2 +- esphome/components/time/real_time_clock.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/esphome/components/climate/climate.h b/esphome/components/climate/climate.h index 7c2a0b1ed3..d81702fb0c 100644 --- a/esphome/components/climate/climate.h +++ b/esphome/components/climate/climate.h @@ -141,7 +141,7 @@ struct ClimateDeviceRestoreState { float target_temperature_low; float target_temperature_high; }; - }; + } __attribute__((packed)); float target_humidity; /// Convert this struct to a climate call that can be performed. diff --git a/esphome/components/time/real_time_clock.h b/esphome/components/time/real_time_clock.h index 900ca2271e..d450a5d8a2 100644 --- a/esphome/components/time/real_time_clock.h +++ b/esphome/components/time/real_time_clock.h @@ -37,7 +37,9 @@ class RealTimeClock : public PollingComponent { void call_setup() override; - void add_on_time_sync_callback(const std::function &callback) { this->time_sync_callback_.add(callback); }; + void add_on_time_sync_callback(std::function &&callback) { + this->time_sync_callback_.add(std::move(callback)); + }; protected: /// Report a unix epoch as current time.