Add const char overload for Component::defer() (#9324)

This commit is contained in:
J. Nick Koston authored and GitHub committed 2025-07-04 21:52:12 -05:00
1 parent 58b4e7dab2
commit 86e7013f40
4 files changed
+95 -4

No files matched your search

+3
View File
@@ -248,6 +248,9 @@ bool Component::cancel_defer(const std::string &name) { // NOLINT
void Component::defer(const std::string &name, std::function<void()> &&f) { // NOLINT
App.scheduler.set_timeout(this, name, 0, std::move(f));
}
void Component::defer(const char *name, std::function<void()> &&f) { // NOLINT
App.scheduler.set_timeout(this, name, 0, std::move(f));
}
void Component::set_timeout(uint32_t timeout, std::function<void()> &&f) { // NOLINT
App.scheduler.set_timeout(this, "", timeout, std::move(f));
}