本文整理汇总了C++中UList::Remove方法的典型用法代码示例。如果您正苦于以下问题:C++ UList::Remove方法的具体用法?C++ UList::Remove怎么用?C++ UList::Remove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UList
的用法示例。
在下文中一共展示了UList::Remove方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
MultiLineObj::~MultiLineObj() {
#ifdef LEAKCHECK
_leakchecker->destroy();
#endif
if (_ulist) {
UList* head = _pts_by_n[count()];
head->Remove(_ulist);
delete _ulist;
delete _x;
delete _y;
} else if (_pts_made) {
delete _x;
delete _y;
}
}
示例2: Unregister
void UHashTable::Unregister (void* key) {
int n = Hash(key);
UList* slot = _slot[n];
if (slot != nil) {
for (UList* u = slot->First(); u != slot->End(); u = u->Next()) {
UHashElem* elem = Elem(u);
if (Equal(elem->GetKey(), key)) {
slot->Remove(u);
delete elem;
delete u;
if (_slot[n]->IsEmpty()) {
delete _slot[n];
_slot[n] = nil;
}
break;
}
}
}
}