mirror of
https://github.com/esphome/esphome.git
synced 2026-09-16 01:28:39 +00:00
fix
This commit is contained in:
@@ -236,8 +236,8 @@ APIError APIPlaintextFrameHelper::read_packet(ReadPacketBuffer *buffer) {
|
||||
}
|
||||
// Write plaintext header into pre-allocated padding before payload.
|
||||
// Returns pointer to start of frame (header + payload are contiguous).
|
||||
static inline uint8_t *write_plaintext_header(uint8_t *buf_start, const MessageInfo &msg,
|
||||
uint8_t frame_header_padding) ESPHOME_ALWAYS_INLINE {
|
||||
ESPHOME_ALWAYS_INLINE static inline uint8_t *write_plaintext_header(uint8_t *buf_start, const MessageInfo &msg,
|
||||
uint8_t frame_header_padding) {
|
||||
// Calculate varint sizes for header layout using inline ternary to avoid varint_slow call overhead
|
||||
uint8_t size_varint_len = msg.payload_size < ProtoSize::VARINT_THRESHOLD_1_BYTE
|
||||
? 1
|
||||
|
||||
Reference in New Issue
Block a user