mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 15:12:06 +00:00 
			
		
		
		
	[api] Optimize protobuf varint encoding for flash savings
This commit is contained in:
		| @@ -221,7 +221,8 @@ 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 | ||||||
|   void encode_varint(uint64_t value) { |   // Mark noinline to prevent code bloat from inlining into every caller | ||||||
|  |   __attribute__((noinline)) void encode_varint(uint64_t value) { | ||||||
|     auto buffer = this->buffer_; |     auto buffer = this->buffer_; | ||||||
|     size_t start = buffer->size(); |     size_t start = buffer->size(); | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user