1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-25 22:52:20 +01:00

[remote_base] Add default value for offset in is_valid (#8159)

This commit is contained in:
Jonathan Swoboda
2025-02-01 05:13:38 -05:00
committed by GitHub
parent 7392397630
commit 051fa3a49f

View File

@@ -54,7 +54,7 @@ class RemoteReceiveData {
uint32_t get_index() const { return index_; }
int32_t operator[](uint32_t index) const { return this->data_[index]; }
int32_t size() const { return this->data_.size(); }
bool is_valid(uint32_t offset) const { return this->index_ + offset < this->data_.size(); }
bool is_valid(uint32_t offset = 0) const { return this->index_ + offset < this->data_.size(); }
int32_t peek(uint32_t offset = 0) const { return this->data_[this->index_ + offset]; }
bool peek_mark(uint32_t length, uint32_t offset = 0) const;
bool peek_space(uint32_t length, uint32_t offset = 0) const;