1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-02 19:32:19 +01:00

Update esphome/components/split_buffer/split_buffer.h

Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
This commit is contained in:
Jesse Hills
2025-08-28 09:16:52 +12:00
committed by GitHub
parent 7cf3657ba4
commit ffa32e64f7

View File

@@ -21,14 +21,14 @@ class SplitBuffer {
const uint8_t &operator[](size_t index) const; const uint8_t &operator[](size_t index) const;
// Get the total length // Get the total length
size_t size() const { return total_length_; } size_t size() const { return this->total_length_; }
// Get buffer information // Get buffer information
size_t get_buffer_count() const { return buffer_count_; } size_t get_buffer_count() const { return this->buffer_count_; }
size_t get_buffer_size() const { return buffer_size_; } size_t get_buffer_size() const { return this->buffer_size_; }
// Check if successfully initialized // Check if successfully initialized
bool is_valid() const { return buffers_ != nullptr && buffer_count_ > 0; } bool is_valid() const { return this->buffers_ != nullptr && this->buffer_count_ > 0; }
private: private:
uint8_t **buffers_{nullptr}; uint8_t **buffers_{nullptr};