1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-13 00:32:20 +01:00

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

View File

@@ -4,7 +4,7 @@
namespace esphome {
namespace template_ {
static const char *TAG = "template.binary_sensor";
static const char *const TAG = "template.binary_sensor";
void TemplateBinarySensor::loop() {
if (!this->f_.has_value())

View File

@@ -6,7 +6,7 @@ namespace template_ {
using namespace esphome::cover;
static const char *TAG = "template.cover";
static const char *const TAG = "template.cover";
TemplateCover::TemplateCover()
: open_trigger_(new Trigger<>()),

View File

@@ -4,7 +4,7 @@
namespace esphome {
namespace template_ {
static const char *TAG = "template.sensor";
static const char *const TAG = "template.sensor";
void TemplateSensor::update() {
if (!this->f_.has_value())

View File

@@ -4,7 +4,7 @@
namespace esphome {
namespace template_ {
static const char *TAG = "template.switch";
static const char *const TAG = "template.switch";
TemplateSwitch::TemplateSwitch() : turn_on_trigger_(new Trigger<>()), turn_off_trigger_(new Trigger<>()) {}

View File

@@ -4,7 +4,7 @@
namespace esphome {
namespace template_ {
static const char *TAG = "template.text_sensor";
static const char *const TAG = "template.text_sensor";
void TemplateTextSensor::update() {
if (!this->f_.has_value())