void CollisionList::clearCollisionList() { ListIterator<collision> cleaner = *ListIterator<collision>(collList).SetFirst(); while(!cleaner.IsEmpty()) { delete cleaner.GetCurrent()->collisionSpot; cleaner.Remove(); } }
bool ObjectTypeCache::unloadObjectType(const char *objtypename) { ObjectType *objTypeToDelete = NULL; ListIterator<ObjectType> i = ListIterator<ObjectType>(cachedObjectTypes); i.SetFirst(); while(!(i.IsLast())) { objTypeToDelete = i.GetCurrent(); if(!strncmp(objTypeToDelete->objectTypeName, objtypename, MAX_STRING_LENGTH)) { i.Remove(); return true; } i.Next(); } return false; }