1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-17 07:15:48 +00:00

[api] Remove unnecessary intermediate variable in frame helpers (#11668)

This commit is contained in:
J. Nick Koston
2025-11-01 22:43:39 -05:00
committed by GitHub
parent d25121a55c
commit 1fc3165b58
2 changed files with 2 additions and 4 deletions

View File

@@ -230,8 +230,7 @@ APIError APIPlaintextFrameHelper::write_protobuf_packets(ProtoWriteBuffer buffer
return APIError::OK;
}
std::vector<uint8_t> *raw_buffer = buffer.get_buffer();
uint8_t *buffer_data = raw_buffer->data(); // Cache buffer pointer
uint8_t *buffer_data = buffer.get_buffer()->data();
this->reusable_iovs_.clear();
this->reusable_iovs_.reserve(packets.size());