Important Update:
- CItemBuffer: - Rename CItemBufferCore -> CItemBuffer - Add item count and GetCount() method - Bug fix: Reset LastItem on DeleteAll() - TimingCore: - Bug fix: Handle buffer overflow on 32-bit processors
This commit is contained in:
@@ -31,13 +31,14 @@ struct SBufferItem {
|
||||
|
||||
//***** Function Prototypes *****//
|
||||
|
||||
class CItemBufferCore
|
||||
class CItemBuffer
|
||||
{
|
||||
protected:
|
||||
// Parameters
|
||||
bool CopyEntries; // Make copies of entries and destroy them when done?
|
||||
int Count;
|
||||
|
||||
// Events
|
||||
// Items
|
||||
TBufferItem * FirstItem;
|
||||
TBufferItem ** LastItem;
|
||||
|
||||
@@ -49,8 +50,8 @@ class CItemBufferCore
|
||||
|
||||
public:
|
||||
// Initiate object
|
||||
CItemBufferCore( bool pCopyEntries );
|
||||
virtual ~CItemBufferCore();
|
||||
CItemBuffer( bool pCopyEntries );
|
||||
virtual ~CItemBuffer();
|
||||
|
||||
// Buffer Operations
|
||||
bool Push( void * Entry, int Size );
|
||||
@@ -58,6 +59,9 @@ class CItemBufferCore
|
||||
void * Peek( int * Size = NULL );
|
||||
bool Delete();
|
||||
void DeleteAll();
|
||||
|
||||
// Misc
|
||||
int GetCount() { return Count; };
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user