mirror of
https://github.com/ETLCPP/etl.git
synced 2026-06-16 00:46:03 +08:00
Change int index parameter to size_t
This commit is contained in:
parent
c426fc40b9
commit
285a2cafe6
@ -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];
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user