示例#1
0
Inlist* SyncPool::releaseAll(Inlist *pItem) {
	if (pItem == NULL) {
		return NULL;
	}
	if (m_nFill > m_nMaxFill) {
		while (pItem != NULL) {
			if (m_bClearItems) {
				clearItem(pItem);
				freeItem(pItem);
			}
			pItem = pItem->next;
		}
		return NULL;
	}

	while (pItem != NULL) {
		Inlist *pNext = pItem->next;
		if (m_bClearItems && !clearItem(pItem)) {
			freeItem(pItem);
			pItem = pNext;
			continue;
		}

		m_nFill++;

		pItem->next = m_pPool;
		m_pPool = pItem;

		pItem = pNext;
	}
	
	return NULL;
}
示例#2
0
void SpellItem::redraw()
{
	if (parent_ != NULL)
	{
		((SpellItem*)parent_)->redraw();
		return;
	}

	// Clear everything
	clearItem();

	// redraw everything
	drawSpell();
	scene()->update();
}
示例#3
0
Inlist* SyncPool::release(Inlist *pItem) {
	if (pItem == NULL) {
		return NULL;
	}
	if (m_bClearItems && !clearItem(pItem)) {
		freeItem(pItem);		
		return NULL;
	}
	if (m_nFill < m_nMaxFill) {
		m_nFill++;
		pItem->next = m_pPool;
		m_pPool = pItem;
	} else if (m_bClearItems) {
		freeItem(pItem);
	}
	return NULL;
}
示例#4
0
void QDeclarativeAnchorsPrivate::_q_widgetDestroyed(QObject *obj)
{
    clearItem(qobject_cast<QGraphicsObject*>(obj));
}
示例#5
0
	RuneItem::~RuneItem()
	{
		clearItem();
	}