Change int index parameter to size_t

This commit is contained in:
John Wellbelove 2021-04-10 19:06:40 +01:00
parent c426fc40b9
commit 285a2cafe6

View File

@ -812,7 +812,7 @@ namespace etl
//*************************************************************************
/// Get a reference to the item.
//*************************************************************************
reference operator [](int index)
reference operator [](size_t index)
{
return pbuffer[(out + index) % BUFFER_SIZE];
}
@ -821,7 +821,7 @@ namespace etl
/// Get a const reference to the item at the back of the buffer.
/// Asserts an error if the buffer is empty.
//*************************************************************************
const_reference operator [](int index) const
const_reference operator [](size_t index) const
{
return pbuffer[(out + index) % BUFFER_SIZE];
}