Activate some clang-tidy checks (#1884)

This commit is contained in:
Otto Winter
2021-06-10 13:04:40 +02:00
committed by GitHub
parent eb9bd69405
commit 360effcb72
109 changed files with 458 additions and 422 deletions
@@ -8,7 +8,7 @@ static const char *TAG = "tuya.climate";
void TuyaClimate::setup() {
if (this->switch_id_.has_value()) {
this->parent_->register_listener(*this->switch_id_, [this](TuyaDatapoint datapoint) {
this->parent_->register_listener(*this->switch_id_, [this](const TuyaDatapoint &datapoint) {
ESP_LOGV(TAG, "MCU reported switch is: %s", ONOFF(datapoint.value_bool));
this->mode = climate::CLIMATE_MODE_OFF;
if (datapoint.value_bool) {
@@ -25,7 +25,7 @@ void TuyaClimate::setup() {
});
}
if (this->active_state_id_.has_value()) {
this->parent_->register_listener(*this->active_state_id_, [this](TuyaDatapoint datapoint) {
this->parent_->register_listener(*this->active_state_id_, [this](const TuyaDatapoint &datapoint) {
ESP_LOGV(TAG, "MCU reported active state is: %u", datapoint.value_enum);
this->active_state_ = datapoint.value_enum;
this->compute_state_();
@@ -33,7 +33,7 @@ void TuyaClimate::setup() {
});
}
if (this->target_temperature_id_.has_value()) {
this->parent_->register_listener(*this->target_temperature_id_, [this](TuyaDatapoint datapoint) {
this->parent_->register_listener(*this->target_temperature_id_, [this](const TuyaDatapoint &datapoint) {
this->target_temperature = datapoint.value_int * this->target_temperature_multiplier_;
ESP_LOGV(TAG, "MCU reported target temperature is: %.1f", this->target_temperature);
this->compute_state_();
@@ -41,7 +41,7 @@ void TuyaClimate::setup() {
});
}
if (this->current_temperature_id_.has_value()) {
this->parent_->register_listener(*this->current_temperature_id_, [this](TuyaDatapoint datapoint) {
this->parent_->register_listener(*this->current_temperature_id_, [this](const TuyaDatapoint &datapoint) {
this->current_temperature = datapoint.value_int * this->current_temperature_multiplier_;
ESP_LOGV(TAG, "MCU reported current temperature is: %.1f", this->current_temperature);
this->compute_state_();