Important update:
- EventBufferCore: (new) - Defines Events and related functions - Defines Event Buffer - ItemBuffer: - Specify "Keep" parameter for Delete, to override CopyEntries
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* BufferCore.h
|
||||
* ItemBufferCore.h
|
||||
*
|
||||
* Created on: 22 July 2017
|
||||
* Author: wentzelc
|
||||
@@ -149,7 +149,7 @@ void * CItemBuffer::Peek( int * Size )
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
bool CItemBuffer::Delete()
|
||||
bool CItemBuffer::Delete( bool Keep )
|
||||
{
|
||||
TBufferItem * BufferItem;
|
||||
|
||||
@@ -166,7 +166,7 @@ bool CItemBuffer::Delete()
|
||||
LastItem = &FirstItem;
|
||||
|
||||
// Destroy entry and holder
|
||||
if (CopyEntries)
|
||||
if (CopyEntries && !Keep)
|
||||
DestroyEntry( &(BufferItem->Entry) );
|
||||
free( BufferItem );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user