mirror of
https://github.com/esphome/esphome.git
synced 2026-02-18 15:35:59 -07:00
[helpers] Allow reading capacity of FixedVector (#13391)
This commit is contained in:
@@ -348,6 +348,8 @@ template<typename T> class FixedVector {
|
|||||||
|
|
||||||
size_t size() const { return size_; }
|
size_t size() const { return size_; }
|
||||||
bool empty() const { return size_ == 0; }
|
bool empty() const { return size_ == 0; }
|
||||||
|
size_t capacity() const { return capacity_; }
|
||||||
|
bool full() const { return size_ == capacity_; }
|
||||||
|
|
||||||
/// Access element without bounds checking (matches std::vector behavior)
|
/// Access element without bounds checking (matches std::vector behavior)
|
||||||
/// Caller must ensure index is valid (i < size())
|
/// Caller must ensure index is valid (i < size())
|
||||||
|
|||||||
Reference in New Issue
Block a user