mirror of
https://github.com/esphome/esphome.git
synced 2025-08-06 10:27:49 +00:00
clarify what we know
This commit is contained in:
parent
cfd43c81fb
commit
f23fd52a26
@ -163,7 +163,10 @@ class Scheduler {
|
|||||||
if (item_name == nullptr) {
|
if (item_name == nullptr) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Fast path: if pointers are equal (common with string deduplication)
|
// Fast path: if pointers are equal
|
||||||
|
// This is effective because the core ESPHome codebase uses static strings (const char*)
|
||||||
|
// for component names. The std::string overloads exist only for compatibility with
|
||||||
|
// external components, but are rarely used in practice.
|
||||||
if (item_name == name_cstr) {
|
if (item_name == name_cstr) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user