Another update from ingydotnet^djgoku
This commit is contained in:
parent
91df62d461
commit
948b86eafa
7604 changed files with 108452 additions and 22726 deletions
|
|
@ -0,0 +1,8 @@
|
|||
template <typename T>
|
||||
void insert_after(Node<T>* N, T&& data)
|
||||
{
|
||||
auto node = new Node<T>{N, N->next, std::forward(data)};
|
||||
if(N->next != nullptr)
|
||||
N->next->prev = node;
|
||||
N->next = node;
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
method : public : native : AddBack(value : Base) ~ Nil {
|
||||
node := ListNode->New(value);
|
||||
if(@head = Nil) {
|
||||
@head := node;
|
||||
@tail := @head;
|
||||
}
|
||||
else {
|
||||
@tail->SetNext(node);
|
||||
node->SetPrevious(@tail);
|
||||
@tail := node;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue