mirror of
https://github.com/esphome/esphome.git
synced 2025-10-29 22:24:26 +00:00
Activate some clang-tidy checks (#1884)
This commit is contained in:
@@ -9,7 +9,9 @@ namespace custom {
|
||||
|
||||
class CustomBinaryOutputConstructor {
|
||||
public:
|
||||
CustomBinaryOutputConstructor(std::function<std::vector<output::BinaryOutput *>()> init) { this->outputs_ = init(); }
|
||||
CustomBinaryOutputConstructor(const std::function<std::vector<output::BinaryOutput *>()> &init) {
|
||||
this->outputs_ = init();
|
||||
}
|
||||
|
||||
output::BinaryOutput *get_output(int i) { return this->outputs_[i]; }
|
||||
|
||||
@@ -19,7 +21,9 @@ class CustomBinaryOutputConstructor {
|
||||
|
||||
class CustomFloatOutputConstructor {
|
||||
public:
|
||||
CustomFloatOutputConstructor(std::function<std::vector<output::FloatOutput *>()> init) { this->outputs_ = init(); }
|
||||
CustomFloatOutputConstructor(const std::function<std::vector<output::FloatOutput *>()> &init) {
|
||||
this->outputs_ = init();
|
||||
}
|
||||
|
||||
output::FloatOutput *get_output(int i) { return this->outputs_[i]; }
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace custom {
|
||||
|
||||
class CustomSwitchConstructor : public Component {
|
||||
public:
|
||||
CustomSwitchConstructor(std::function<std::vector<switch_::Switch *>()> init) { this->switches_ = init(); }
|
||||
CustomSwitchConstructor(const std::function<std::vector<switch_::Switch *>()> &init) { this->switches_ = init(); }
|
||||
|
||||
switch_::Switch *get_switch(int i) { return this->switches_[i]; }
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace custom {
|
||||
|
||||
class CustomTextSensorConstructor : public Component {
|
||||
public:
|
||||
CustomTextSensorConstructor(std::function<std::vector<text_sensor::TextSensor *>()> init) {
|
||||
CustomTextSensorConstructor(const std::function<std::vector<text_sensor::TextSensor *>()> &init) {
|
||||
this->text_sensors_ = init();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user