Example #1
0
    static void _PushBefore(ViDoubleLinkNode3 <T> after, ViDoubleLink3 <T> list)
    {
        if (list.IsEmpty())
        {
            return;
        }
        ViDoubleLinkNode3 <T> first = list._root._next;
        ViDoubleLinkNode3 <T> back  = list._root._pre;
        ViDoubleLinkNode3 <T> pre   = after._pre;

        _Link(pre, first);
        _Link(back, after);
        list._Init();
    }
Example #2
0
    static void _PushAfter(ViDoubleLinkNode3 <T> before, ViDoubleLink3 <T> list)
    {
        if (list.IsEmpty())
        {
            return;
        }
        ViDoubleLinkNode3 <T> first = list._root._next;
        ViDoubleLinkNode3 <T> back  = list._root._pre;
        ViDoubleLinkNode3 <T> next  = before._next;

        _Link(before, first);
        _Link(back, next);
        list._Init();
    }