Skip to content

Commit

Permalink
Fixes FIFO buffer after fix-shadow-variables (#2524)
Browse files Browse the repository at this point in the history
Co-authored-by: Michael D Starch <[email protected]>
  • Loading branch information
LeStarch and Michael D Starch authored Feb 13, 2024
1 parent 4fc42ce commit 4342da8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Os/Pthreads/FIFOBufferQueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ namespace Os {
fifoQueue->data = data;
fifoQueue->head = 0;
fifoQueue->tail = 0;
this->queue = fifoQueue;
this->m_queue = fifoQueue;
return true;
}

void BufferQueue::finalize() {
FIFOQueue* fQueue = static_cast<FIFOQueue*>(this->queue);
FIFOQueue* fQueue = static_cast<FIFOQueue*>(this->m_queue);
if (nullptr != fQueue)
{
U8* data = fQueue->data;
Expand All @@ -60,13 +60,13 @@ namespace Os {
}
delete fQueue;
}
this->queue = nullptr;
this->m_queue = nullptr;
}

bool BufferQueue::enqueue(const U8* buffer, NATIVE_UINT_TYPE size, NATIVE_INT_TYPE priority) {
(void) priority;

FIFOQueue* fQueue = static_cast<FIFOQueue*>(this->queue);
FIFOQueue* fQueue = static_cast<FIFOQueue*>(this->m_queue);
U8* data = fQueue->data;

// Store the buffer to the queue:
Expand All @@ -81,7 +81,7 @@ namespace Os {
bool BufferQueue::dequeue(U8* buffer, NATIVE_UINT_TYPE& size, NATIVE_INT_TYPE &priority) {
(void) priority;

FIFOQueue* fQueue = static_cast<FIFOQueue*>(this->queue);
FIFOQueue* fQueue = static_cast<FIFOQueue*>(this->m_queue);
U8* data = fQueue->data;

// Get the buffer from the queue:
Expand Down

0 comments on commit 4342da8

Please sign in to comment.