Lines Matching refs:newNode
62 void insertAfter(NODE* node, NODE* newNode) { in insertAfter() argument
63 newNode->prev = node; in insertAfter()
64 newNode->next = node->next; in insertAfter()
65 if (node->next == nullptr) mLast = newNode; in insertAfter()
66 else node->next->prev = newNode; in insertAfter()
67 node->next = newNode; in insertAfter()
70 void insertBefore(NODE* node, NODE* newNode) { in insertBefore() argument
71 newNode->prev = node->prev; in insertBefore()
72 newNode->next = node; in insertBefore()
73 if (node->prev == nullptr) mFirst = newNode; in insertBefore()
74 else node->prev->next = newNode; in insertBefore()
75 node->prev = newNode; in insertBefore()
78 void insertHead(NODE* newNode) { in insertHead() argument
80 mFirst = mLast = newNode; in insertHead()
81 newNode->prev = newNode->next = nullptr; in insertHead()
83 newNode->prev = nullptr; in insertHead()
84 newNode->next = mFirst; in insertHead()
85 mFirst->prev = newNode; in insertHead()
86 mFirst = newNode; in insertHead()
90 void insertTail(NODE* newNode) { in insertTail() argument
92 insertHead(newNode); in insertTail()
94 newNode->prev = mLast; in insertTail()
95 newNode->next = 0; in insertTail()
96 mLast->next = newNode; in insertTail()
97 mLast = newNode; in insertTail()