[core] Tidy scheduler doc comments after std::string overload removal

This commit is contained in:
J. Nick Koston
2026-06-21 10:32:09 -05:00
parent ff56d66ced
commit dea76e9236
2 changed files with 5 additions and 5 deletions

View File

@@ -357,9 +357,9 @@ class Component {
/// so once a flag is set, subsequent (potentially different) messages may be suppressed. /// so once a flag is set, subsequent (potentially different) messages may be suppressed.
bool set_status_flag_(uint8_t flag); bool set_status_flag_(uint8_t flag);
/** Set an interval function with a unique name. Empty name means no cancelling possible. /** Set an interval function with a const char* name. Empty name means no cancelling possible.
* *
* This will call f every interval ms. Can be cancelled via CancelInterval(). * This will call f every interval ms. Can be cancelled via cancel_interval().
* Similar to javascript's setInterval(). * Similar to javascript's setInterval().
* *
* IMPORTANT NOTE: * IMPORTANT NOTE:
@@ -443,7 +443,7 @@ class Component {
ESPDEPRECATED("cancel_retry is deprecated and will be removed in 2026.8.0.", "2026.2.0") ESPDEPRECATED("cancel_retry is deprecated and will be removed in 2026.8.0.", "2026.2.0")
bool cancel_retry(uint32_t id); // NOLINT bool cancel_retry(uint32_t id); // NOLINT
/** Set a timeout function with a unique name. /** Set a timeout function with a const char* name.
* *
* Similar to javascript's setTimeout(). Empty name means no cancelling possible. * Similar to javascript's setTimeout(). Empty name means no cancelling possible.
* *

View File

@@ -384,8 +384,8 @@ class Scheduler {
inline bool HOT names_match_static_(const char *name1, const char *name2) const { inline bool HOT names_match_static_(const char *name1, const char *name2) const {
// Check pointer equality first (common for static strings), then string contents // Check pointer equality first (common for static strings), then string contents
// The core ESPHome codebase uses static strings (const char*) for component names, // The core ESPHome codebase uses static strings (const char*) for component names,
// making pointer comparison effective. The std::string overloads exist only for // making pointer comparison effective. The strcmp fallback covers distinct pointers
// compatibility with external components but are rarely used in practice. // with identical content (e.g. names built into separate static buffers).
return (name1 != nullptr && name2 != nullptr) && ((name1 == name2) || (strcmp(name1, name2) == 0)); return (name1 != nullptr && name2 != nullptr) && ((name1 == name2) || (strcmp(name1, name2) == 0));
} }