1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-14 13:55:45 +00:00
This commit is contained in:
J. Nick Koston
2025-10-28 21:46:22 -05:00
parent 81fdc14d7f
commit ea14f374e7

View File

@@ -220,12 +220,7 @@ class ProtoWriteBuffer {
void write(uint8_t value) { this->buffer_->push_back(value); } void write(uint8_t value) { this->buffer_->push_back(value); }
// Single implementation that all overloads delegate to // Single implementation that all overloads delegate to
// Use aggressive optimization for this hot path even in -Os builds void encode_varint(uint64_t value) {
#if defined(__GNUC__) && !defined(__clang__)
__attribute__((optimize("O3")))
#endif
void
encode_varint(uint64_t value) {
auto buffer = this->buffer_; auto buffer = this->buffer_;
size_t start = buffer->size(); size_t start = buffer->size();