diff --git a/esphome/components/logger/logger.h b/esphome/components/logger/logger.h index aa5e75cbd3..38e28f7624 100644 --- a/esphome/components/logger/logger.h +++ b/esphome/components/logger/logger.h @@ -213,8 +213,8 @@ struct LogBuffer { bool full_() const { return this->pos >= this->size; } uint16_t remaining_() const { return this->size - this->pos; } char *current_() { return this->data + this->pos; } - void put_char_(char c) { this->data[this->pos++] = c; } - void null_terminate_() { this->data[this->full_() ? this->size - 1 : this->pos] = '\0'; } + inline void put_char_(char c) { this->data[this->pos++] = c; } + inline void null_terminate_() { this->data[this->full_() ? this->size - 1 : this->pos] = '\0'; } void write_(const char *value, size_t length) { if (this->full_()) return;