Move CDataPack from core to logic.

This commit is contained in:
David Anderson
2015-09-06 11:02:52 -07:00
parent 69984f472f
commit 67c8ee4ce3
9 changed files with 39 additions and 34 deletions
+2 -22
View File
@@ -515,16 +515,6 @@ void SourceModBase::ShutdownServices()
pBase = pBase->m_pGlobalClassNext;
}
/* Delete all data packs */
CStack<CDataPack *>::iterator iter;
CDataPack *pd;
for (iter=m_freepacks.begin(); iter!=m_freepacks.end(); iter++)
{
pd = (*iter);
delete pd;
}
m_freepacks.popall();
sCoreProviderImpl.ShutdownHooks();
/* Notify! */
@@ -624,26 +614,16 @@ unsigned int SourceModBase::GetGlobalTarget() const
IDataPack *SourceModBase::CreateDataPack()
{
CDataPack *pack;
if (m_freepacks.empty())
{
pack = new CDataPack;
} else {
pack = m_freepacks.front();
m_freepacks.pop();
pack->Initialize();
}
return pack;
return logicore.CreateDataPack();
}
void SourceModBase::FreeDataPack(IDataPack *pack)
{
m_freepacks.push(static_cast<CDataPack *>(pack));
logicore.FreeDataPack(pack);
}
Handle_t SourceModBase::GetDataPackHandleType(bool readonly)
{
//:TODO:
return 0;
}