fix double dep warning

This commit is contained in:
J. Nick Koston
2026-01-13 22:33:32 -10:00
parent c73a412537
commit 1210512286
+24
View File
@@ -118,7 +118,10 @@ void Component::setup() {}
void Component::loop() {}
void Component::set_interval(const std::string &name, uint32_t interval, std::function<void()> &&f) { // NOLINT
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
App.scheduler.set_interval(this, name, interval, std::move(f));
#pragma GCC diagnostic pop
}
void Component::set_interval(const char *name, uint32_t interval, std::function<void()> &&f) { // NOLINT
@@ -126,7 +129,10 @@ void Component::set_interval(const char *name, uint32_t interval, std::function<
}
bool Component::cancel_interval(const std::string &name) { // NOLINT
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
return App.scheduler.cancel_interval(this, name);
#pragma GCC diagnostic pop
}
bool Component::cancel_interval(const char *name) { // NOLINT
@@ -135,7 +141,10 @@ bool Component::cancel_interval(const char *name) { // NOLINT
void Component::set_retry(const std::string &name, uint32_t initial_wait_time, uint8_t max_attempts,
std::function<RetryResult(uint8_t)> &&f, float backoff_increase_factor) { // NOLINT
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
App.scheduler.set_retry(this, name, initial_wait_time, max_attempts, std::move(f), backoff_increase_factor);
#pragma GCC diagnostic pop
}
void Component::set_retry(const char *name, uint32_t initial_wait_time, uint8_t max_attempts,
@@ -144,7 +153,10 @@ void Component::set_retry(const char *name, uint32_t initial_wait_time, uint8_t
}
bool Component::cancel_retry(const std::string &name) { // NOLINT
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
return App.scheduler.cancel_retry(this, name);
#pragma GCC diagnostic pop
}
bool Component::cancel_retry(const char *name) { // NOLINT
@@ -152,7 +164,10 @@ bool Component::cancel_retry(const char *name) { // NOLINT
}
void Component::set_timeout(const std::string &name, uint32_t timeout, std::function<void()> &&f) { // NOLINT
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
App.scheduler.set_timeout(this, name, timeout, std::move(f));
#pragma GCC diagnostic pop
}
void Component::set_timeout(const char *name, uint32_t timeout, std::function<void()> &&f) { // NOLINT
@@ -160,7 +175,10 @@ void Component::set_timeout(const char *name, uint32_t timeout, std::function<vo
}
bool Component::cancel_timeout(const std::string &name) { // NOLINT
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
return App.scheduler.cancel_timeout(this, name);
#pragma GCC diagnostic pop
}
bool Component::cancel_timeout(const char *name) { // NOLINT
@@ -321,13 +339,19 @@ void Component::defer(std::function<void()> &&f) { // NOLINT
App.scheduler.set_timeout(this, static_cast<const char *>(nullptr), 0, std::move(f));
}
bool Component::cancel_defer(const std::string &name) { // NOLINT
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
return App.scheduler.cancel_timeout(this, name);
#pragma GCC diagnostic pop
}
bool Component::cancel_defer(const char *name) { // NOLINT
return App.scheduler.cancel_timeout(this, name);
}
void Component::defer(const std::string &name, std::function<void()> &&f) { // NOLINT
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
App.scheduler.set_timeout(this, name, 0, std::move(f));
#pragma GCC diagnostic pop
}
void Component::defer(const char *name, std::function<void()> &&f) { // NOLINT
App.scheduler.set_timeout(this, name, 0, std::move(f));