FastLED 3.9.15
Loading...
Searching...
No Matches

◆ at() [1/2]

template<typename T, typename Allocator = fl::allocator<T>>
T & fl::deque< T, Allocator >::at ( fl::size index)
inline

Definition at line 228 of file deque.h.

228 {
229 if (index >= mSize) {
230 // Handle bounds error - in embedded context, we'll just return the first element
231 // In a real implementation, this might throw an exception
232 return mData[mFront];
233 }
234 return mData[get_index(index)];
235 }
T * mData
Definition deque.h:19
fl::size mFront
Definition deque.h:22
fl::size get_index(fl::size logical_index) const
Definition deque.h:58
fl::size mSize
Definition deque.h:21