Skip to content

Commit 484080b

Browse files
authored
Fix build error in icircular_buffer::iterator and icircular_buffer::const_iterator (#956)
1 parent 081e920 commit 484080b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

include/etl/circular_buffer.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -251,15 +251,15 @@ namespace etl
251251
//*************************************************************************
252252
reference operator [](size_t index)
253253
{
254-
return pbuffer[(current + index) % picb->buffer_size];
254+
return picb->pbuffer[(current + index) % picb->buffer_size];
255255
}
256256

257257
//*************************************************************************
258258
/// [] operator
259259
//*************************************************************************
260260
const_reference operator [](size_t index) const
261261
{
262-
return pbuffer[(current + index) % picb->buffer_size];
262+
return picb->pbuffer[(current + index) % picb->buffer_size];
263263
}
264264

265265
//*************************************************************************
@@ -438,7 +438,7 @@ namespace etl
438438
//***************************************************
439439
pointer get_buffer() const
440440
{
441-
return pbuffer;
441+
return picb->pbuffer;
442442
}
443443

444444
protected:
@@ -550,7 +550,7 @@ namespace etl
550550
//*************************************************************************
551551
const_reference operator [](size_t index) const
552552
{
553-
return pbuffer[(current + index) % picb->buffer_size];
553+
return picb->pbuffer[(current + index) % picb->buffer_size];
554554
}
555555

556556
//*************************************************************************
@@ -717,7 +717,7 @@ namespace etl
717717
//***************************************************
718718
pointer get_buffer() const
719719
{
720-
return pbuffer;
720+
return picb->pbuffer;
721721
}
722722

723723
protected:

0 commit comments

Comments
 (0)