1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-11 14:23:47 +01:00

Fix clang-tidy header filter (#2385)

* Fix clang-tidy header filter

* Allow private members

* Fix clang-tidy detections

* Run clang-format

* Fix remaining detections

* Fix graph

* Run clang-format
This commit is contained in:
Otto Winter
2021-09-24 18:02:28 +02:00
committed by GitHub
parent 52dd79691b
commit aec02afcdc
76 changed files with 404 additions and 367 deletions

View File

@@ -80,7 +80,7 @@ class AddressableLight : public LightOutput, public Component {
void mark_shown_() {
#ifdef USE_POWER_SUPPLY
for (auto c : *this) {
for (const auto &c : *this) {
if (c.get().is_on()) {
this->power_.request();
return;

View File

@@ -9,7 +9,7 @@ namespace light {
class AddressableLightWrapper : public light::AddressableLight {
public:
explicit AddressableLightWrapper(light::LightState *light_state) : light_state_(light_state) {
this->wrapper_state_ = new uint8_t[5];
this->wrapper_state_ = new uint8_t[5]; // NOLINT(cppcoreguidelines-owning-memory)
}
int32_t size() const override { return 1; }

View File

@@ -18,6 +18,7 @@ class ESPRangeView : public ESPColorSettable {
public:
ESPRangeView(AddressableLight *parent, int32_t begin, int32_t end)
: parent_(parent), begin_(begin), end_(end < begin ? begin : end) {}
ESPRangeView(const ESPRangeView &) = default;
int32_t size() const { return this->end_ - this->begin_; }
ESPColorView operator[](int32_t index) const;
@@ -62,6 +63,7 @@ class ESPRangeView : public ESPColorSettable {
class ESPRangeIterator {
public:
ESPRangeIterator(const ESPRangeView &range, int32_t i) : range_(range), i_(i) {}
ESPRangeIterator(const ESPRangeIterator &) = default;
ESPRangeIterator operator++() {
this->i_++;
return *this;