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

This commit is contained in:
Jonathan Swoboda 2025-02-01 05:13:38 -05:00 committed by GitHub
parent 7392397630
commit 051fa3a49f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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;