This commit is contained in:
Otto Winter 2019-12-07 18:53:20 +01:00
parent 056c72d50d
commit ae784dc74c
No known key found for this signature in database
GPG key ID: DB66C0BE6013F97E

View file

@ -139,19 +139,19 @@ float Component::get_actual_setup_priority() const {
} }
void Component::set_setup_priority(float priority) { this->setup_priority_override_ = priority; } void Component::set_setup_priority(float priority) { this->setup_priority_override_ = priority; }
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpmf-conversions"
bool Component::has_overridden_loop() const { bool Component::has_overridden_loop() const {
#ifdef CLANG_TIDY #ifdef CLANG_TIDY
bool loop_overridden = true; bool loop_overridden = true;
bool call_loop_overridden = true; bool call_loop_overridden = true;
#else #else
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpmf-conversions"
bool loop_overridden = (void *) (this->*(&Component::loop)) != (void *) (&Component::loop); bool loop_overridden = (void *) (this->*(&Component::loop)) != (void *) (&Component::loop);
bool call_loop_overridden = (void *) (this->*(&Component::call_loop)) != (void *) (&Component::call_loop); bool call_loop_overridden = (void *) (this->*(&Component::call_loop)) != (void *) (&Component::call_loop);
#pragma GCC diagnostic pop
#endif #endif
return loop_overridden || call_loop_overridden; return loop_overridden || call_loop_overridden;
} }
#pragma GCC diagnostic pop
PollingComponent::PollingComponent(uint32_t update_interval) : Component(), update_interval_(update_interval) {} PollingComponent::PollingComponent(uint32_t update_interval) : Component(), update_interval_(update_interval) {}