Beispiel #1
0
void ChoiceView::setChoices(const QList<Choice> &choices) {
    _choices = choices;
    if (_offset >= _choices.size()) {
        // Integer division floors here.
        _offset = (_choices.size() / 10) * 10;
    }
    emit morePages((_choices.size() + 9) / 10);
    refreshLabels();
}
Beispiel #2
0
inline BYTE* ObjectMemory::FixedSizePool::allocatePage()
{
	if (!m_pFreePages)
	{
		morePages();
		ASSERT(m_pFreePages);
	}

	Link* pPage = m_pFreePages;
	m_pFreePages = pPage->next;
	
	return reinterpret_cast<BYTE*>(pPage);
}