1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-16 02:02:21 +01:00

Enable a bunch of clang-tidy checks (#2149)

This commit is contained in:
Oxan van Leeuwen
2021-12-01 21:03:51 +01:00
committed by GitHub
parent f58828cb82
commit 607601b3a4
79 changed files with 206 additions and 296 deletions

View File

@@ -28,7 +28,7 @@ std::string format_buffer(uint8_t *b, uint8_t len) {
std::string format_uid(std::vector<uint8_t> &uid) {
char buf[32];
int offset = 0;
for (uint8_t i = 0; i < uid.size(); i++) {
for (size_t i = 0; i < uid.size(); i++) {
const char *format = "%02X";
if (i + 1 < uid.size())
format = "%02X-";
@@ -479,7 +479,7 @@ bool RC522BinarySensor::process(std::vector<uint8_t> &data) {
if (data.size() != this->uid_.size())
result = false;
else {
for (uint8_t i = 0; i < data.size(); i++) {
for (size_t i = 0; i < data.size(); i++) {
if (data[i] != this->uid_[i]) {
result = false;
break;