aboutsummaryrefslogtreecommitdiffstats
path: root/common/ringbuffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/ringbuffer.h')
-rw-r--r--common/ringbuffer.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/ringbuffer.h b/common/ringbuffer.h
index fa8fce10..9628505c 100644
--- a/common/ringbuffer.h
+++ b/common/ringbuffer.h
@@ -98,6 +98,8 @@ public:
void writeAdvance(size_t cnt) noexcept
{ mWritePtr.fetch_add(cnt, std::memory_order_acq_rel); }
+ size_t getElemSize() const noexcept { return mElemSize; }
+
/**
* Create a new ringbuffer to hold at least `sz' elements of `elem_sz'
* bytes. The number of elements is rounded up to the next power of two