Revert "DoublyLinkedList: Add a RemoveAllBefore convenience function."
This reverts commit c6cd9b51a2.
This wound up being unnecessary for the event_queue implementation,
and furthermore is of dubious value in general.
This commit is contained in:
@@ -338,8 +338,6 @@ public:
|
|||||||
inline void Add(Element* element, bool back = true);
|
inline void Add(Element* element, bool back = true);
|
||||||
inline void Remove(Element* element);
|
inline void Remove(Element* element);
|
||||||
|
|
||||||
inline void RemoveAllBefore(Element* element);
|
|
||||||
|
|
||||||
inline void Swap(Element* a, Element* b);
|
inline void Swap(Element* a, Element* b);
|
||||||
|
|
||||||
inline void MoveFrom(DOUBLY_LINKED_LIST_CLASS_NAME* fromList);
|
inline void MoveFrom(DOUBLY_LINKED_LIST_CLASS_NAME* fromList);
|
||||||
@@ -502,7 +500,6 @@ DOUBLY_LINKED_LIST_CLASS_NAME::Add(Element* element, bool back)
|
|||||||
Insert(element, back);
|
Insert(element, back);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Remove
|
// Remove
|
||||||
DOUBLY_LINKED_LIST_TEMPLATE_LIST
|
DOUBLY_LINKED_LIST_TEMPLATE_LIST
|
||||||
void
|
void
|
||||||
@@ -531,19 +528,6 @@ DOUBLY_LINKED_LIST_CLASS_NAME::Remove(Element* element)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// RemoveAllBefore
|
|
||||||
DOUBLY_LINKED_LIST_TEMPLATE_LIST
|
|
||||||
void
|
|
||||||
DOUBLY_LINKED_LIST_CLASS_NAME::RemoveAllBefore(Element* element)
|
|
||||||
{
|
|
||||||
if (element != NULL) {
|
|
||||||
fFirst = element;
|
|
||||||
sGetLink(element)->previous = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Swap
|
// Swap
|
||||||
DOUBLY_LINKED_LIST_TEMPLATE_LIST
|
DOUBLY_LINKED_LIST_TEMPLATE_LIST
|
||||||
void
|
void
|
||||||
@@ -567,7 +551,6 @@ DOUBLY_LINKED_LIST_CLASS_NAME::Swap(Element* a, Element* b)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// MoveFrom
|
// MoveFrom
|
||||||
DOUBLY_LINKED_LIST_TEMPLATE_LIST
|
DOUBLY_LINKED_LIST_TEMPLATE_LIST
|
||||||
void
|
void
|
||||||
@@ -587,7 +570,6 @@ DOUBLY_LINKED_LIST_CLASS_NAME::MoveFrom(DOUBLY_LINKED_LIST_CLASS_NAME* fromList)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// RemoveAll
|
// RemoveAll
|
||||||
DOUBLY_LINKED_LIST_TEMPLATE_LIST
|
DOUBLY_LINKED_LIST_TEMPLATE_LIST
|
||||||
void
|
void
|
||||||
@@ -597,7 +579,6 @@ DOUBLY_LINKED_LIST_CLASS_NAME::RemoveAll()
|
|||||||
fLast = NULL;
|
fLast = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// RemoveHead
|
// RemoveHead
|
||||||
DOUBLY_LINKED_LIST_TEMPLATE_LIST
|
DOUBLY_LINKED_LIST_TEMPLATE_LIST
|
||||||
Element*
|
Element*
|
||||||
|
|||||||
Reference in New Issue
Block a user