Avoid non-const globals and enable clang-tidy check (#1892)

This commit is contained in:
Stefan Agner
2021-06-10 22:19:44 +02:00
committed by GitHub
parent 360effcb72
commit 501f88ca86
376 changed files with 466 additions and 468 deletions
@@ -4,7 +4,7 @@
namespace esphome {
namespace tuya {
static const char *TAG = "tuya.binary_sensor";
static const char *const TAG = "tuya.binary_sensor";
void TuyaBinarySensor::setup() {
this->parent_->register_listener(this->sensor_id_, [this](const TuyaDatapoint &datapoint) {
@@ -4,7 +4,7 @@
namespace esphome {
namespace tuya {
static const char *TAG = "tuya.climate";
static const char *const TAG = "tuya.climate";
void TuyaClimate::setup() {
if (this->switch_id_.has_value()) {
+1 -1
View File
@@ -5,7 +5,7 @@
namespace esphome {
namespace tuya {
static const char *TAG = "tuya.fan";
static const char *const TAG = "tuya.fan";
void TuyaFan::setup() {
auto traits = fan::FanTraits(this->oscillation_id_.has_value(), this->speed_id_.has_value(),
+1 -1
View File
@@ -4,7 +4,7 @@
namespace esphome {
namespace tuya {
static const char *TAG = "tuya.light";
static const char *const TAG = "tuya.light";
void TuyaLight::setup() {
if (this->color_temperature_id_.has_value()) {
@@ -4,7 +4,7 @@
namespace esphome {
namespace tuya {
static const char *TAG = "tuya.sensor";
static const char *const TAG = "tuya.sensor";
void TuyaSensor::setup() {
this->parent_->register_listener(this->sensor_id_, [this](const TuyaDatapoint &datapoint) {
@@ -4,7 +4,7 @@
namespace esphome {
namespace tuya {
static const char *TAG = "tuya.switch";
static const char *const TAG = "tuya.switch";
void TuyaSwitch::setup() {
this->parent_->register_listener(this->switch_id_, [this](const TuyaDatapoint &datapoint) {
+1 -1
View File
@@ -6,7 +6,7 @@
namespace esphome {
namespace tuya {
static const char *TAG = "tuya";
static const char *const TAG = "tuya";
static const int COMMAND_DELAY = 50;
void Tuya::setup() {