mirror of
https://github.com/esphome/esphome.git
synced 2026-02-28 18:04:19 -07:00
[core] Keep declarations unconditional to fix clang-tidy
component.h is included before defines.h in application.h, so the #ifdef guards on declarations were evaluated before the define was visible. Keep declarations always visible (harmless unused declarations cost nothing) and only guard the definitions.
This commit is contained in:
@@ -109,9 +109,7 @@ class Component {
|
||||
|
||||
float get_actual_setup_priority() const;
|
||||
|
||||
#ifdef USE_SETUP_PRIORITY_OVERRIDE
|
||||
void set_setup_priority(float priority);
|
||||
#endif
|
||||
|
||||
/** priority of loop(). higher -> executed earlier
|
||||
*
|
||||
@@ -564,9 +562,8 @@ class WarnIfComponentBlockingGuard {
|
||||
Component *component_;
|
||||
};
|
||||
|
||||
#ifdef USE_SETUP_PRIORITY_OVERRIDE
|
||||
// Function to clear setup priority overrides after all components are set up
|
||||
// Only has an implementation when USE_SETUP_PRIORITY_OVERRIDE is defined
|
||||
void clear_setup_priority_overrides();
|
||||
#endif
|
||||
|
||||
} // namespace esphome
|
||||
|
||||
Reference in New Issue
Block a user