Skip to content

Commit

Permalink
Fix build error in icircular_buffer::iterator and `icircular_buffer…
Browse files Browse the repository at this point in the history
…::const_iterator` (#956)
  • Loading branch information
ZachOB committed Sep 18, 2024
1 parent 081e920 commit 484080b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions include/etl/circular_buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,15 +251,15 @@ namespace etl
//*************************************************************************
reference operator [](size_t index)
{
return pbuffer[(current + index) % picb->buffer_size];
return picb->pbuffer[(current + index) % picb->buffer_size];
}

//*************************************************************************
/// [] operator
//*************************************************************************
const_reference operator [](size_t index) const
{
return pbuffer[(current + index) % picb->buffer_size];
return picb->pbuffer[(current + index) % picb->buffer_size];
}

//*************************************************************************
Expand Down Expand Up @@ -438,7 +438,7 @@ namespace etl
//***************************************************
pointer get_buffer() const
{
return pbuffer;
return picb->pbuffer;
}

protected:
Expand Down Expand Up @@ -550,7 +550,7 @@ namespace etl
//*************************************************************************
const_reference operator [](size_t index) const
{
return pbuffer[(current + index) % picb->buffer_size];
return picb->pbuffer[(current + index) % picb->buffer_size];
}

//*************************************************************************
Expand Down Expand Up @@ -717,7 +717,7 @@ namespace etl
//***************************************************
pointer get_buffer() const
{
return pbuffer;
return picb->pbuffer;
}

protected:
Expand Down

0 comments on commit 484080b

Please sign in to comment.