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

Activate some clang-tidy checks (#1884)

This commit is contained in:
Otto Winter
2021-06-10 13:04:40 +02:00
committed by GitHub
parent eb9bd69405
commit 360effcb72
109 changed files with 458 additions and 422 deletions

View File

@@ -1,8 +1,10 @@
#include "esphome/core/component.h"
#include "esphome/core/helpers.h"
#include "esphome/core/esphal.h"
#include "esphome/core/log.h"
#include "esphome/core/application.h"
#include "esphome/core/esphal.h"
#include "esphome/core/helpers.h"
#include "esphome/core/log.h"
#include <utility>
namespace esphome {
@@ -173,7 +175,7 @@ void Nameable::set_name(const std::string &name) {
this->name_ = name;
this->calc_object_id_();
}
Nameable::Nameable(const std::string &name) : name_(name) { this->calc_object_id_(); }
Nameable::Nameable(std::string name) : name_(std::move(name)) { this->calc_object_id_(); }
const std::string &Nameable::get_object_id() { return this->object_id_; }
bool Nameable::is_internal() const { return this->internal_; }