You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
430 B
31 lines
430 B
// PRECOMP
|
|
#include "precomp.h"
|
|
|
|
|
|
POSITION CWBOBLIST::AddHead(VOID* pItem)
|
|
{
|
|
POSITION posRet = NULL;
|
|
|
|
if (m_pHead)
|
|
{
|
|
if (posRet = new COBNODE)
|
|
{
|
|
posRet->pNext = m_pHead;
|
|
posRet->pItem = pItem;
|
|
m_pHead = posRet;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
ASSERT(!m_pTail);
|
|
if (m_pHead = new COBNODE)
|
|
{
|
|
m_pTail = m_pHead;
|
|
m_pHead->pItem = pItem;
|
|
m_pHead->pNext = NULL;
|
|
}
|
|
}
|
|
|
|
return m_pHead;
|
|
}
|
|
|