Remove VecNetMessages and VecNetDataFragments

Improved and used CUtlVector class instead.
This commit is contained in:
Kawe Mazidjatari 2022-06-23 19:52:58 +02:00
parent 1b6f40d941
commit 965b4f4367
3 changed files with 10 additions and 25 deletions

View File

@ -44,24 +44,6 @@ public:
bf_write m_DataOut;
};
struct VecNetMessages
{
CNetMessage** items;
int64_t m_nAllocationCount;
int64_t m_nGrowSize;
int m_Size;
int padding_;
};
struct VecNetDataFragments
{
void** items;
int64_t m_nAllocationCount;
int64_t m_nGrowSize;
int m_Size;
int padding_;
};
//-------------------------------------------------------------------------
// MM_HEARTBEAT
//-------------------------------------------------------------------------

View File

@ -10,6 +10,7 @@
#include "tier1/bitbuf.h"
#include "tier1/NetAdr2.h"
#include "tier1/utlmemory.h"
#include "tier1/utlvector.h"
#include "common/netmessages.h"
#include "common/protocol.h"
#include "public/include/inetchannel.h"
@ -129,7 +130,7 @@ private:
uint32_t m_Rate;
int padding_maybe;
double m_fClearTime;
VecNetDataFragments m_WaitingList;
CUtlVector<dataFragments_t*> m_WaitingList;
dataFragments_t m_ReceiveList;
int m_nSubOutFragmentsAck;
int m_nSubInFragments;
@ -144,7 +145,7 @@ private:
uint32_t dword168;
float m_Timeout;
INetChannelHandler* m_MessageHandler;
VecNetMessages m_NetMessages;
CUtlVector<INetMessage*> m_NetMessages;
uint64_t qword198;
int m_nQueuedPackets;
float m_flRemoteFrameTime;

View File

@ -11,11 +11,13 @@
#include "tier1/utlmemory.h"
struct __declspec(align(4)) CUtlVector
template< class T, class A = CUtlMemory<T> >
class CUtlVector
{
void* vtable;
CUtlMemory m_Memory;
typedef A CAllocator;
public:
typedef T ElemType_t;
protected:
CAllocator m_Memory;
int m_Size;
};