Replace ifdef with defined()

This commit is contained in:
Anton Sergunov 2024-06-07 13:51:40 +00:00
parent ddc3e65e40
commit 547517450d

View file

@ -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};