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; }
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpmf-conversions"
bool Component::has_overridden_loop() const {
#ifdef CLANG_TIDY
bool loop_overridden = true;
bool call_loop_overridden = true;
#else
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpmf-conversions"
bool loop_overridden = (void *) (this->*(&Component::loop)) != (void *) (&Component::loop);
bool call_loop_overridden = (void *) (this->*(&Component::call_loop)) != (void *) (&Component::call_loop);
#pragma GCC diagnostic pop
#endif
return loop_overridden || call_loop_overridden;
}
#pragma GCC diagnostic pop
PollingComponent::PollingComponent(uint32_t update_interval) : Component(), update_interval_(update_interval) {}