[core] Force inline Component::get_component_log_str() (#15363)

This commit is contained in:
J. Nick Koston
2026-04-01 16:15:00 -10:00
committed by GitHub
parent be56be5201
commit f36d78e09c
2 changed files with 3 additions and 4 deletions
-3
View File
@@ -267,9 +267,6 @@ void Component::call() {
break;
}
}
const LogString *Component::get_component_log_str() const {
return component_source_lookup(this->component_source_index_);
}
bool Component::should_warn_of_blocking(uint32_t blocking_time) {
// Convert centisecond threshold to milliseconds for comparison
uint32_t threshold_ms = static_cast<uint32_t>(this->warn_if_blocking_over_) * 10U;
+3 -1
View File
@@ -323,7 +323,9 @@ class Component {
*
* Returns LOG_STR("<unknown>") if source not set
*/
const LogString *get_component_log_str() const;
inline const LogString *get_component_log_str() const ESPHOME_ALWAYS_INLINE {
return component_source_lookup(this->component_source_index_);
}
bool should_warn_of_blocking(uint32_t blocking_time);