Skip to content

Commit 46d639f

Browse files
author
Carmelo Fernandez Aguera
committed
Ring buffer clear
1 parent 5ae694e commit 46d639f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/staticRingBuffer.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ namespace etl
7070
++readPos;
7171
}
7272

73+
void clear()
74+
{
75+
readPos = writePos;
76+
}
77+
7378
private:
7479
size_t writePos {};
7580
size_t readPos {};

0 commit comments

Comments
 (0)