Add doubly-linked list
DList is an adjusted copy of SList. Missing: * insertBack * insertAfter * removeBack
This commit is contained in:
parent
32e19c8b58
commit
357c7e279d
@ -14,9 +14,18 @@ module tanya.container.entry;
|
|||||||
|
|
||||||
package struct SEntry(T)
|
package struct SEntry(T)
|
||||||
{
|
{
|
||||||
/// Item content.
|
// Item content.
|
||||||
T content;
|
T content;
|
||||||
|
|
||||||
/// Next item.
|
// Next item.
|
||||||
SEntry* next;
|
SEntry* next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
package struct DEntry(T)
|
||||||
|
{
|
||||||
|
// Item content.
|
||||||
|
T content;
|
||||||
|
|
||||||
|
// Previous and next item.
|
||||||
|
DEntry* next, prev;
|
||||||
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user