diff options
author | Chris Robinson <[email protected]> | 2024-01-03 19:10:15 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2024-01-03 19:10:15 -0800 |
commit | 8c80f29e242dee18cb914d3cdb396bd96e935547 (patch) | |
tree | 1ec189802b81060295edcffa5b77976a6373b9d5 /common/ringbuffer.h | |
parent | 18349e1da2c79d0f41c8c4f12ccd065f91618a6f (diff) |
Avoid some const_casts
Diffstat (limited to 'common/ringbuffer.h')
-rw-r--r-- | common/ringbuffer.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/common/ringbuffer.h b/common/ringbuffer.h index a2b820eb..ee59205a 100644 --- a/common/ringbuffer.h +++ b/common/ringbuffer.h @@ -33,7 +33,6 @@ public: }; using DataPair = std::pair<Data,Data>; - RingBuffer(const std::size_t count) : mBuffer{count} { } /** Reset the read and write pointers to zero. This is not thread safe. */ @@ -44,13 +43,13 @@ public: * hold the current readable data. If the readable data is in one segment * the second segment has zero length. */ - [[nodiscard]] auto getReadVector() const noexcept -> DataPair; + [[nodiscard]] auto getReadVector() noexcept -> DataPair; /** * The non-copying data writer. Returns two ringbuffer data pointers that * hold the current writeable data. If the writeable data is in one segment * the second segment has zero length. */ - [[nodiscard]] auto getWriteVector() const noexcept -> DataPair; + [[nodiscard]] auto getWriteVector() noexcept -> DataPair; /** * Return the number of elements available for reading. This is the number |