mirror of
https://github.com/esphome/esphome.git
synced 2024-11-27 09:18:00 +01:00
Replace ifdef with defined()
This commit is contained in:
parent
ddc3e65e40
commit
547517450d
1 changed files with 2 additions and 2 deletions
|
@ -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};
|
||||
|
|
Loading…
Reference in a new issue