Skip to content

Commit

Permalink
use ring_buffer_size_t
Browse files Browse the repository at this point in the history
  • Loading branch information
m0dB authored and m0dB committed Nov 13, 2024
1 parent 3059a3b commit ee45bd2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/util/fifo.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class FIFO {
// Windows compilation and should be done in a follow-up PR.
// using ring_buffer_size_t = int;

template <class DataType>
template<class DataType>
class FIFO {
public:
using size_type = std::size_t;
Expand Down Expand Up @@ -164,9 +164,9 @@ class FIFO {
// the second region will be nullptr and size 0.
int aquireReadRegions(size_type count,
DataType** dataPtr1,
int* sizePtr1,
ring_buffer_size_t* sizePtr1,
DataType** dataPtr2,
int* sizePtr2) {
ring_buffer_size_t* sizePtr2) {
size_type readIndex = m_readIndex.load(std::memory_order_relaxed);
const size_type writeIndex = m_writeIndex.load(std::memory_order_acquire);
const size_type available = writeIndex - readIndex;
Expand All @@ -190,9 +190,9 @@ class FIFO {
// Same as aquireReadRegions, for write operations
int aquireWriteRegions(size_type count,
DataType** dataPtr1,
int* sizePtr1,
ring_buffer_size_t* sizePtr1,
DataType** dataPtr2,
int* sizePtr2) {
ring_buffer_size_t* sizePtr2) {
const size_type readIndex = m_readIndex.load(std::memory_order_acquire);
size_type writeIndex = m_writeIndex.load(std::memory_order_relaxed);
const size_type available = m_size - (writeIndex - readIndex);
Expand Down

0 comments on commit ee45bd2

Please sign in to comment.