mirror of
https://github.com/esphome/esphome.git
synced 2025-10-03 18:42:23 +01:00
tweak, compiler optimizes it away anyways though
This commit is contained in:
@@ -111,9 +111,11 @@ void APIFrameHelper::buffer_data_from_iov_(const struct iovec *iov, int iovcnt,
|
|||||||
|
|
||||||
uint16_t buffer_size = total_write_len - offset;
|
uint16_t buffer_size = total_write_len - offset;
|
||||||
auto &buffer = this->tx_buf_[this->tx_buf_tail_];
|
auto &buffer = this->tx_buf_[this->tx_buf_tail_];
|
||||||
buffer = std::make_unique<SendBuffer>();
|
buffer = std::make_unique<SendBuffer>(SendBuffer{
|
||||||
buffer->size = buffer_size;
|
.data = std::make_unique<uint8_t[]>(buffer_size),
|
||||||
buffer->data = std::make_unique<uint8_t[]>(buffer_size);
|
.size = buffer_size,
|
||||||
|
.offset = 0,
|
||||||
|
});
|
||||||
|
|
||||||
uint16_t to_skip = offset;
|
uint16_t to_skip = offset;
|
||||||
uint16_t write_pos = 0;
|
uint16_t write_pos = 0;
|
||||||
|
Reference in New Issue
Block a user