From 547517450dc5065ac1470bc829745e59a028e2da Mon Sep 17 00:00:00 2001 From: Anton Sergunov Date: Fri, 7 Jun 2024 13:51:40 +0000 Subject: [PATCH] Replace ifdef with defined() --- esphome/components/sntp/sntp_component.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/components/sntp/sntp_component.h b/esphome/components/sntp/sntp_component.h index cbe461256a..f23e00804c 100644 --- a/esphome/components/sntp/sntp_component.h +++ b/esphome/components/sntp/sntp_component.h @@ -22,7 +22,7 @@ class SNTPComponent : public time::RealTimeClock { void update() override; void loop() override; -#ifdef USE_ESP_IDF +#if defined(USE_ESP_IDF) void set_update_interval(uint32_t update_interval) override; uint32_t get_update_interval() const override; #endif @@ -35,7 +35,7 @@ class SNTPComponent : public time::RealTimeClock { std::string servers_[3]; protected: -#ifdef USE_ESP_IDF +#if defined(USE_ESP_IDF) bool has_time_{false}; #endif bool servers_was_setup_{false};