mirror of
https://github.com/esphome/esphome.git
synced 2025-09-26 23:22:21 +01:00
Avoid non-const globals and enable clang-tidy check (#1892)
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
namespace esphome {
|
||||
namespace api {
|
||||
|
||||
static const char *TAG = "api";
|
||||
static const char *const TAG = "api";
|
||||
|
||||
// APIServer
|
||||
void APIServer::setup() {
|
||||
@@ -199,7 +199,7 @@ void APIServer::on_climate_update(climate::Climate *obj) {
|
||||
|
||||
float APIServer::get_setup_priority() const { return setup_priority::AFTER_WIFI; }
|
||||
void APIServer::set_port(uint16_t port) { this->port_ = port; }
|
||||
APIServer *global_api_server = nullptr;
|
||||
APIServer *global_api_server = nullptr; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
|
||||
|
||||
void APIServer::set_password(const std::string &password) { this->password_ = password; }
|
||||
void APIServer::send_homeassistant_service_call(const HomeassistantServiceResponse &call) {
|
||||
|
Reference in New Issue
Block a user