Skip to content

Commit

Permalink
20140812
Browse files Browse the repository at this point in the history
  • Loading branch information
ldcsaa committed Aug 13, 2014
1 parent 668dd66 commit 9a2f863
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Common/Src/RingBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@

template <class T, class _PutGuard = CCriSec, class _GetGuard = CCriSec> class CRingBuffer
{
public:
static const UINT DEFAULT_SIZE = 4096;

public:
BOOL Put(T* pElement)
{
Expand Down Expand Up @@ -244,7 +247,7 @@ template <class T, class _PutGuard = CCriSec, class _GetGuard = CCriSec> class C
return TRUE;
}

BOOL Create(DWORD dwExpect = DEFAULT_EXPECT)
BOOL Create(DWORD dwExpect = DEFAULT_SIZE)
{
ASSERT(!IsValid() && dwExpect > 0);

Expand Down Expand Up @@ -367,7 +370,7 @@ template <class T, class _PutGuard = CCriSec, class _GetGuard = CCriSec> class C
}

public:
CRingBuffer(BOOL bCreate = FALSE, DWORD uiExpect = DEFAULT_EXPECT)
CRingBuffer(BOOL bCreate = FALSE, DWORD uiExpect = DEFAULT_SIZE)
: m_pv(nullptr)
, m_bValid(FALSE)
, m_dwReal(0)
Expand Down

0 comments on commit 9a2f863

Please sign in to comment.