]> git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_transform/lib/LinkedList.cpp
Security-58286.51.6.tar.gz
[apple/security.git] / OSX / libsecurity_transform / lib / LinkedList.cpp
1 #include "LinkedList.h"
2
3
4
5 LinkedListHeader::LinkedListHeader()
6 {
7 mBackward = mForward = this;
8 }
9
10
11
12 LinkedListHeader::~LinkedListHeader()
13 {
14 // unlink the item
15 mBackward->mForward = mForward;
16 mForward->mBackward = mBackward;
17 }
18
19
20
21 void LinkedListHeader::InsertAfter(LinkedListHeader* header)
22 {
23 // add to the chain
24 header->mForward = mForward;
25 mForward->mBackward = header;
26 header->mBackward = this;
27 mForward = header;
28 }
29