File tree 2 files changed +5
-30
lines changed
2 files changed +5
-30
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ aa[std.zlib]=-dip1000
60
60
aa[std.algorithm.comparison] =-dip1000
61
61
aa[std.algorithm.internal] =-dip1000
62
62
aa[std.algorithm.iteration] =-dip25 # WIP_carblue
63
- aa[std.algorithm.mutation]=-dip1000
63
+ aa[std.algorithm.mutation]=-dip25 # depends on std.container.slist (https://github.com/dlang/phobos/pull/6295)
64
64
aa[std.algorithm.package]=-dip1000
65
65
aa[std.algorithm.searching] =-dip25 # depends on https://github.com/dlang/phobos/pull/6246 merged and std.algorithm.comparison fixed
66
66
aa[std.algorithm.setops]=-dip1000
@@ -95,7 +95,7 @@ aa[std.container.binaryheap]=-dip1000
95
95
aa[std.container.dlist] =-dip1000
96
96
aa[std.container.package] =-dip1000
97
97
aa[std.container.rbtree] =-dip25 # DROP
98
- aa[std.container.slist]=-dip1000 -version=DIP1000 # merged https://github.com/dlang/phobos/pull/6295
98
+ aa[std.container.slist]=-dip25 # - dip1000 -version=DIP1000 depends on https://github.com/dlang/phobos/pull/6295 merged
99
99
aa[std.container.util]=-dip25 # TODO
100
100
101
101
aa[std.datetime.date] =-dip25 # depends on a fix for writefln
Original file line number Diff line number Diff line change @@ -138,22 +138,9 @@ struct SList(T)
138
138
/**
139
139
Constructor taking a number of nodes
140
140
*/
141
- this (U)(scope U[] values ... ) if (isImplicitlyConvertible! (U, T))
141
+ this (U)(U[] values ... ) if (isImplicitlyConvertible! (U, T))
142
142
{
143
- initialize();
144
- Node* n, newRoot;
145
- foreach (item; values )
146
- {
147
- auto newNode = new Node(null , item);
148
- (newRoot ? n._next : newRoot) = newNode;
149
- n = newNode;
150
- }
151
- if (n)
152
- {
153
- // Last node points to the old root
154
- n._next = _first;
155
- _first = newRoot;
156
- }
143
+ insertFront(values );
157
144
}
158
145
159
146
/**
@@ -372,7 +359,7 @@ Complexity: $(BIGOH m), where $(D m) is the length of $(D stuff)
372
359
{
373
360
initialize();
374
361
size_t result;
375
- Node* n, newRoot;
362
+ Node * n, newRoot;
376
363
foreach (item; stuff)
377
364
{
378
365
auto newNode = new Node(null , item);
@@ -924,15 +911,3 @@ Complexity: $(BIGOH n)
924
911
s.reverse();
925
912
assert (s[].equal([3 , 2 , 1 ]));
926
913
}
927
-
928
- version (DIP1000)
929
- @safe unittest
930
- {
931
- int i, j;
932
- auto s = SList! (int * )([&i, &j]);
933
- assert (s._root);
934
- assert (s._root._next);
935
- assert (s._root._next._next);
936
- assert (s._root._next._payload == &i);
937
- assert (s._root._next._next._payload == &j);
938
- }
You can’t perform that action at this time.
0 commit comments